COM and .NET Interoperability.pdf

(6514 KB) Pobierz
674480943 UNPDF
COM and .NET
Interoperability
ANDREW TROELSEN
674480943.002.png
COM and .NET Interoperability
Copyright © 2002 by Andrew Troelsen
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any
means, electronic or mechanical, including photocopying, recording, or by any information
storage or retrieval system, without the prior written permission of the copyright owner and the
publisher.
ISBN (pbk): 1-59059-011-2
Printed and bound in the United States of America 12345678910
Trademarked names may appear in this book. Rather than use a trademark symbol with every
occurrence of a trademarked name, we use the names only in an editorial fashion and to the
benefit of the trademark owner, with no intention of infringement of the trademark.
Technical Reviewers: Habib Heydarian, Eric Gunnerson
Editorial Directors: Dan Appleman, Peter Blackburn, Gary Cornell, Jason Gilmore,
Karen Watterson, John Zukowski
Managing Editor: Grace Wong
Copy Editors: Anne Friedman, Ami Knox
Proofreaders: Nicole LeClerc, Sofia Marchant
Compositor: Diana Van Winkle, Van Winkle Design
Artist: Kurt Krames
Indexer: Valerie Robbins
Cover Designer: Tom Debolski
Marketing Manager: Stephanie Rodriguez
Distributed to the book trade in the United States by Springer-Verlag New York, Inc., 175 Fifth
Avenue, New York, NY, 10010 and outside the United States by Springer-Verlag GmbH & Co. KG,
Tiergartenstr. 17, 69112 Heidelberg, Germany.
In the United States, phone 1-800-SPRINGER, email orders@springer-ny.com , or visit
http://www.springer-ny.com .
Outside the United States, fax +49 6221 345229, email orders@springer.de , or visit
http://www.springer.de .
For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219,
Berkeley, CA 94710.
Phone: 510-549-5930, Fax: 510-549-5939, Email: info@apress.com , Web site:
http://www.apress.com .
The information in this book is distributed on an “as is” basis, without warranty. Although every
precaution has been taken in the preparation of this work, neither the author nor Apress shall
have any liability to any person or entity with respect to any loss or damage caused or alleged to
be caused directly or indirectly by the information contained in this work.
The source code for this book is available to readers at http://www.apress.com in the Downloads
section. You will need to answer questions pertaining to this book in order to successfully down-
load the code.
674480943.003.png
674480943.004.png
This book is dedicated to Mary and Wally Troelsen (aka Mom and Dad).
Thanks for buying me my first computer (the classic Atari 400) so long ago and for staying
awake during my last visit when I explained (in dreadful detail) how System.Object is so
much better than IUnknown. I love you both.
674480943.005.png
Contents at a Glance
Acknowledgments ...............................................................................................xxiii
Introduction .......................................................................................................xxv
Chapter 1 Understanding Platform Invocation Services .................1
Chapter 2 The Anatomy of a COM Server ...............................................51
Chapter 3 A Primer on COM Programming Frameworks .....................127
Chapter 4 COM Type Information .............................................................161
Chapter 5 The Anatomy of a .NET Server ...........................................229
Chapter 6 .NET Types ...................................................................................289
Chapter 7 .NET-to-COM Interoperability—
The Basics ...................................................................................339
Chapter 8 .NET-to-COM Interoperability—
Intermediate Topics ...............................................................403
Chapter 9 .NET-to-COM Interoperability—
Advanced Topics ........................................................................471
Chapter 10 COM-to-.NET Interoperability—
The Basics ...................................................................................539
Chapter 11 COM-to-.NET Interoperability—
Intermediate Topics ...............................................................593
Chapter 12 COM-to-.NET Interoperability—
Advanced Topics ........................................................................633
Chapter 13 Building Serviced Components
(COM+ Interop) ..........................................................................669
Index ......................................................................................................................669
v
674480943.001.png
Zgłoś jeśli naruszono regulamin