COM and .NET Interoperability (Expert's Voice) and over one million other books are available for Amazon Kindle. Learn more
Buy Used
+ $3.99 shipping
Used: Very Good | Details
Sold by hippo_books
Condition: Used: Very Good
Comment: Very Good: Cover and pages show some wear from reading and storage.
Access codes and supplements are not guaranteed with used items.
Have one to sell? Sell on Amazon
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See this image

COM and .NET Interoperability Paperback – April 20, 2002

ISBN-13: 978-1590590119 ISBN-10: 1590590112 Edition: 1st

Price: $0.72
10 New from $40.00 18 Used from $0.72
Amazon Price New from Used from
"Please retry"
"Please retry"
$40.00 $0.72
Free Two-Day Shipping for College Students with Amazon Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student

Get Up to 80% Back When You Sell Us Your Books

Shop the New Digital Design Bookstore
Check out the Digital Design Bookstore, a new hub for photographers, art directors, illustrators, web developers, and other creative individuals to find highly rated and highly relevant career resources. Shop books on web development and graphic design, or check out blog posts by authors and thought-leaders in the design industry. Shop now

Product Details

  • Series: Expert's Voice
  • Paperback: 769 pages
  • Publisher: Apress; 1st edition (April 20, 2002)
  • Language: English
  • ISBN-10: 1590590112
  • ISBN-13: 978-1590590119
  • Product Dimensions: 1.7 x 7.2 x 9.2 inches
  • Shipping Weight: 2.9 pounds
  • Average Customer Review: 4.6 out of 5 stars  See all reviews (8 customer reviews)
  • Amazon Best Sellers Rank: #1,892,113 in Books (See Top 100 in Books)

Editorial Reviews Review

Aimed at the more experienced developer who needs to get the old and the new in Windows to coexist, COM and .NET Interoperability gives you all the nitty-gritty detail to get .NET Framework code and the older COM standard to work together effectively. Crammed with technical knowledge and a wide range of programming techniques you most likely won't find anywhere else, this book will fill a worthwhile niche as corporations move older Windows code to .NET.

The in-depth technical detail of the inner workings of both COM and .NET sets it apart. It says a lot about this title that it is only after 300 pages of introductory material on the inner workings of COM and .NET that the text turns to interoperability between the two. First comes a traditional tour of COM components, including all the gnarly details of Iunknown, GUIDs, type libraries, late binding (and Idispatch), and deployment through the registry. A short section looks at using the Active Template Library (ATL) and its wizards to simplify "traditional" COM components.

The author also examines how to build and deploy equivalent components in .NET, along with some more advanced material on reflection, generating on-the-fly code, and assembly information. Material on emulating late-binding in .NET is also a standout here, as this technique is not obvious under the new Windows.

At the heart of this book are six chapters showing how to get .NET to call COM code and vice versa, organized into beginning, intermediate, and advanced techniques for each. Core material here shows how to invoke COM objects within .NET, as well as ActiveX controls, a worthy addition, as this is likely to be a workable strategy for .NET developers for years to come. Advanced techniques range further afield. When it comes to calling .NET code from older COM code, apart from the basics of invoking .NET from within "traditional" C++ and Visual Basic, the author also shows how to "consume" new .NET classes like collections within COM.

Final sections turn toward other COM+ services, with a full tour of transactions and just-in-time activation (JITA) for building more scalable Windows components. (Here, besides "classic" COM+ components in C++, the author shows how to do it in .NET.) The book rounds out with examples of "fully serviced" Windows components in .NET, including a solid example using a Web service.

While COM is destined to wither away, for the next few years there will be ample opportunity for advanced programmers to leverage an in-depth knowledge of COM and .NET. This book's authoritative treatment of most every conceivable permutation of COM and .NET code interaction makes it the definitive resource on the subject. Armed with this title, any advanced C++/C# developer will be able to mix in old code and new code effectively. --Richard Dragan

Topics covered: Introduction to Platform Invocation (PInvoke) services; calling a traditional DLL from C and C++; using PInvoke to call a traditional DLL with .NET; callback functions in .NET for DLLs; tutorial for COM servers (conventions and built-in interfaces, GUIDs, class factories, deployment); C++ COM clients; IDispatch and scriptable objects; Active Template Library (ATL) basics (including wizard support); COM servers in VB 6; COM IDL files in detail (type libraries and programming reading type info); using C# to view COM type libraries; .NET servers (including assemblies and deployment options); advanced techniques for on-the-fly code generation with the System.CodeDOM APIs; .NET types explained; using .NET reflection APIs (viewing type info in C#); late binding in .NET; basic .NET to COM interoperability (converting COM IDL to .NET types); deploying Interop assemblies; intermediate techniques (including using COM Variants, Param arrays, structures and collections between platforms, events and delegates, error handling); advanced techniques (COM classes implementing .NET interfaces); consuming ActiveX controls in .NET code; modifying Interop assemblies; basic COM to .NET code-sharing techniques (including the COM Callable Wrapper, CCW, the tlbexp.exe utility, COM-aware .NET types); consuming .NET components in VB 6, C++, and VBScript; intermediate COM to .NET techniques (using .NET enumerated types, structures, delegates, and collections within COM); advanced techniques for using .NET in COM (changing type marshaling, custom COM interfaces, defining COM interfaces using managed code, manually defining COM atoms in C#, custom hosts for the .NET runtime); overview of COM+ (including the transactions, pooling, and the COM+ Catalog); classic COM+ components versus .NET equivalentsp; lazy automatic registration; object construction strings; just-in-time activation (JITA); transactional programming in .NET; and sample serviced components (including a Web service example).

From the Publisher

Another great title in the Apress and Intertech-Inc Instructor Series.

Customer Reviews

4.6 out of 5 stars
Share your thoughts with other customers

Most Helpful Customer Reviews

10 of 12 people found the following review helpful By Richard Hertzberg, PKC Corporation on July 23, 2002
Format: Paperback
Like Andrew's "C# and the .NET Platform", this book combines an excellent technical overview with nitty gritty examples that detail how to use these technologies in your own development. We followed the book's step-by-step instructions to create a CCW that allows us to use the NET framework's XML digital signature support in our existing unmanaged code. Try cobbling up an XMLDSIG implementation on your own! I can't imagine anyone attempting to use Interop technology without a reference like this.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
3 of 3 people found the following review helpful By Jeffrey Heaton VINE VOICE on December 21, 2004
Format: Paperback
There may be times when you need to access legacy COM DLL's written in non-managed C++ or Visual Basic. This may be as a stop-gap measure until your older legacy code can be updated to .NET. In cases where performance is critical, you may have no desire to ever upgrade your C++ DLL, but would like to use C# for GUI design, rather than Microsoft Foundation Classes. If any of these situations apply, this is the book for you.

This book begins with a few chapters that will bring the reader up to date on both sides of the GAP. First you are shown the fundamentals of COM objects. Second you are shown the newer .NET architecture. Only by understanding both sides will you be able to make the two effectively communicate. For experienced users, who are already familiar with COM and .NET this section can easily be skipped. The book then continues with an overview of what datatypes are available on each side, and how they cross over.

The real meat of the book comes in the next two sections. Three chapters (the basics, intermediate and advanced topics) are given first for COM to .NET. Then the exact same pattern is repeated from .NET to COM. I spent most of my time with the .NET to COM part of the book, as I was using a C++ DLL with C#. The book answered all of my questions and I was able to successfully implement the application.

The book provides a great deal of good information, but it is sometimes hard to find exactly what you are looking for. Each direction is covered in chapters named the basics, intermediate and advanced topics. What exactly is meant by this is not clear until you begin the chapter. I often found myself skimming all three sections trying to find an example close to what I was doing.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
1 of 1 people found the following review helpful By JonShops on October 11, 2012
Format: Paperback Verified Purchase
This is an amazingly well-organized text. I can hardly imagine how Troelsen figured out the right angle of approach, but he did!

The first few chapter are an excellent introduction to COM. I feel like my unstanding went from pattern-following to solid (but not especially deep). Troelsen offers an example of a COM object coded completely by hand in C++ that is enlightening.

The deeper one gets into Windows or .NET, the more one realizes just how entrenched COM is. Interop is still, a decade after .NET's debut, a very important issue. This may well be the best all-in-one text on that topic. However, Nathan's .NET and COM is more in-depth and has a very deep DirectX example that is much more real-world than most of Troelsen's examples. Still, Nathan is dense by comparison, and at the prices these books are going for, why not get both?

At this point I can only give an at-a-glance perspective relating this text to Templeman and Mueller, which is that they both rest around the same 'depth' but Templeman may be a little more this-then-that with very pragmatic short coding examples, while Troelsen has that wonderful teaching organization, and Nathan is somewhat denser than either Troelsen or Templeman.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
By Osier W Tanner II on October 3, 2013
Format: Paperback Verified Purchase
Loved it. Great service and speed on getting the book in on time. This was exactly what I was looking for.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

More About the Author

Andrew W. Troelsen is a partner, software developer, and trainer at Intertech, Inc., a Minneapolis-based training firm that specializes in education for Enterprise Web Developers. Troelsen is a Microsoft Certified Solution Developer and holds the Master of Technical Training (MTT) designation. He has presented at various technical conferences, and is also the author of Developer's Workshop to COM+ (1-55622-724-8).

What Other Items Do Customers Buy After Viewing This Item?