John Paul Mueller
A Division of Microsoft Corporation
One Microsoft Way
Redmond, Washington 98052-6399
Copyright 2003 by Julian Templeman and John Mueller
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
COM Programming with Microsoft .NET / Julian Templeman, John Paul Mueller.
1. Application softwareDevelopment. 2. COM (Computer architecture) 3. Microsoft
.NET. I. Mueller, John, 1958- II. Title.
Printed and bound in the United States of America.
1 2 3 4 5 6 7 8 9 QWE 8 7 6 5 4 3
Distributed in Canada by H.B. Fenn and Company Ltd.
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 www.microsoft.com/mspress. Send comments to email@example.com .
ActiveX, IntelliSense, Microsoft, Microsoft Press, MS-DOS, MSDN, Visual Basic, Visual C++, Visual C#, 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, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious. No association with any real company, organization, product, domain name , e-mail address, logo, person, place, or event is intended or should be inferred.
Acquisitions Editor: Danielle Bird Voeller
Project Editor: Kathleen Atkins
Technical Editor: Brian Johnson
Body Part No. X09-06383
To all the other JATs, with love and appreciation .
An air compressor, also known as an air pump, is a machine that decreases the volume and increases the pressure of a quantity of air by mechanical means. Air thus compressed pos sesses great potential energy because when the external pressure is removed, the air expands rapidly . The controlled expansive force of compressed air is used in many ways and provides the motive force for air motors and tools, including pneumatic hammers, air drills, sandblasting machines, and paint sprayers.
At Microsoft Press, we use tools to illustrate our books for software developers and IT professionals. Tools very simply and powerfully symbolize human inventiveness. Theyre a metaphor for people extending their capabilities, precision, and reach. From simple cal ipers and pliers to digital micrometers and lasers, these stylized illustrations give each book a visual identity, and a personality to the series. With tools and knowledge, theres no limit to creativity and innovation. Our tagline says it all: the tools you need to put tech nology to work.
The manuscript for this book was prepared and galleyed using Microsoft Word. Pages were composed by Microsoft Press using Adobe FrameMaker+SGML for Windows, with text in Garamond and display type in Helvetica Condensed. Composed pages were delivered to the printer as electronic prepress files.
Cover Designer: Methodologie, Inc.
Interior Graphic Designer: James D. Kramer
Principal Compositor: Gina Cassill
Interior Artist: Michael Kloepfer
Copy Editor: Roger LeBlanc
Proofreader: nSight, Inc.
Indexer: Julie Hatley
Julian Templeman first touched fingers to keypunch in 1972 and has since pro grammed everything from 8-bit microcomputers to Cray supercomputers. He currently runs a consultancy and training company in London, specializing in Microsoft .NET, COM, C++, and Java. Julian has written several programming books, including titles on Microsoft Visual C#, Visual Basic .NET, and ATL.
John Paul Mueller
John Mueller is a freelance author and technical editor. He has writing in his blood, having produced 57 books and over 200 articles to date. The topics range from networking to artificial intelligence and from database management to heads-down programming. Some of his current books include several C# developer guides, a small business and home office networking guide, a book on SOAP, and several Windows XP user guides. His technical editing skills have helped over 31 authors refine the content of their manuscripts. John has pro vided technical editing services to Databased Advisor and contributed articles to a number of magazines. He is currently the editor of the .NET electronic newsletter for Pinnacle Publishing.
As always, many people have been involved in the development of a book such as this.
Many thanks go to the team at Microsoft Press, who have done such a good job of steering this project through the writing and editing process. As commissioning editor, Danielle Bird Voeller was brave enough to believe Julians assertions that this would be a worthwhile project. Kathleen Atkins provided excellent guidance and support as editor, and made the writing process as smooth as it could be. Thanks must also go to the other reviewers and edi tors involved in the project, especially Marc Young and Brian Johnson, who provided valuable technical support. Any errors which may remain in the book are, of course, our responsibility and not theirs.
Finally, wed like to thank our respective families for putting up with the disruption involved in producing a book like this.