Copyright© 1999 by George Shepherd, Brad King
A Division of Microsoft Corporation
One Microsoft Way
Redmond, Washington 98052-6399
Copyright © 1999 by George Shepherd and Brad King
All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher.
Library of Congress Cataloging-in-Publication Data
Inside ATL / George Shepherd, Brad King.
1. Application software--Development. 2. Active template library.
I. King, Brad. II. Title.
Printed and bound in the United States of America.
1 2 3 4 5 6 7 8 9 QMQM 4 3 2 1 0 9
Distributed in Canada by Penguin Books Canada Limited.
A CIP catalogue record for this book is available from the British Library.
Microsoft Press books are available through booksellers and distributors worldwide. For further information about international editions, contact your local Microsoft Corporation office or contact Microsoft Press International directly at fax (425) 936-7329. Visit our Web site at mspress.microsoft.com.
ActiveX, Developer Studio, JScript, Microsoft, Microsoft Press, Visual Basic, Visual C++, Visual FoxPro, Visual InterDev, Visual J++, Visual Studio, Win32, Windows, and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Other product and company names mentioned herein may be the trademarks of their respective owners.
The example companies, organizations, products, people, and events depicted herein are fictitious. No association with any real company, organization, product, person, or event is intended or should be inferred.
Acquisitions Editor: Eric Stroo
Project Editor: Sally Stickney
Technical Editor: Jim Fuchs
Manuscript Editors: Sally Stickney, Rebecca McKay[Previous] [Next]
To Ted Shepherd, one most excellent guy.
To Matthew and Amanda. You are my greatest blessing.
—Brad King[Previous] [Next]
We both want to thank everyone at Microsoft Press and all the people who reviewed the manuscript for their kind support throughout this project. Eric Stroo, thanks for your patience as we completed the chapters (not always as fast as you wanted them). Sally Stickney and Rebecca McKay, thanks for your excellent job editing the manuscript and making it readable. Sally Stickney and John Pierce, thanks for managing the project. Jim Fuchs at Microsoft Press, Jason Whittington at DevelopMentor, and Rick Watson at RogueWave Software, thanks for doing technical reviews of our manuscript.
We also want to thank Steve Zimmerman for getting this book rolling. Steve was originally slated to write the book. Unfortunately, he was unable to finish the project because of time constraints. Steve contributed significantly to the early chapters.
Thanks also to Claire Horne for helping to manage the project. It was great working with you.
George has these individual acknowledgments: Wow—this is the third book project Iíve been involved in. I keep saying "never again," but I canít seem to resist. Each one has been an adventure of some sort, and this book was no exception. Iíd like to thank the following people for their part in helping me finish this book.
Thanks to my son, Ted, an endless source of inspiration and enlightenment. Teddy is bountiful in his provision of wisdom. Once while sitting at dinner, Ted said to me, "Like, if you drew a graph of my brain, my knowledge would be this big [showing a small space between his thumb and forefinger] and my imagination would be this big [holding his hands far apart]." I said, "Good—youíll need that much imagination to understand ATL." Also thanks to Sandy Daston for tolerating my absences and my often grumpy disposition as I toiled on this project.
Thanks to Don Box for continuing to explain COM in ways that make sense. Also a big thanks to Mike Abercrombie at DevelopMentor for creating a wonderful environment for thinking about software—especially distributed objects. Thanks also to the folks at RogueWave—especially Jeff Boenig, Rick Watson, Bill Loeb, Jay Gopalkrishna, Jay Pitzer, Mike Jones, Ellen Cyr, Sam Robinson, Rob Oliver, Mark Isham, and Kate Dinardi—for the extra support and for bearing with my wackiness.
Thanks to Joe Flannigan at Microsoft Systems Journal and to Gwenn McKone at Visual C++ Developers Journal for working with me on your fine magazines.
Thanks to the many other folks who have touched this project, including those who attended my classes through DevelopMentor and my presentations at conferences as well as those who read Microsoft Systems Journal and Visual C++ Developers Journal.
And finally, a very special thanks to Brad King. Brad brought a tremendous amount of programming insight to this project, along with a really great sense of humor. Good job, Brad!
Brad has these individual acknowledgments: When George first planted the seed of coauthoring Inside ATL, I was both ecstatic and terrified. As a developer with a full-time job, I could hardly imagine making the commitment to write a book. Now the task is done. Thanks, George. Youíre infallible.
Thanks to my wife, Jenelle, for hot coffee brewed in the wee hours when I needed it. Itís just one of the many manifestations of how awesome you are. Thanks to my son, Matthew, for calling me out to shoot some hoops once in a while and to my daughter, Amanda, for forgiving my absence from many important moments. Thanks to Mom and Dad for being there, each in your own way, throughout my 34 years. Thanks to Howard Keim Jr. for his inspirational living and faith. Thanks to Bill and Carol Sissel for your sacrifices for the kids.
Thanks to Mark Isham, Michael Jones, and Mike Blaszczak for various choice microbrew encounters. Thanks to Days of the New and Creed for great Inside ATL background tunes. Thanks to Walter Sullivan for putting up with Jones and me bugging him.
And last but not least, thanks to the ATL team at Microsoft for feeding us, the hungry C++ masses.