COM and .NET Interoperability 
Buy it at Amazon
Read a Sample Chapter From The Publisher
Author Andrew Troelsen
Publisher APress
Length 840 pages
vbRad Rating: 5 fingers up. (5 out of 5)
Reviewed by Robert

Andrew Troelsen seems to be a man on a roll. Shortly after cranking out the gigantic Advanced Guide to VB.NET and .NET in general, this piece comes out. Just as his previous work, it is large in size, covers every conceivable situation and presents dozens of practical solutions as you strive to keep your existing pre .NET code useful. It is easy to read and can easily function as either a tutorial or a reference. The book is of tremendous technical expertise.

Despite the name of the book, it also covers access to non-COM code such as straight Windows DLLs, which is great for my beloved super fast straight C 3D-distance calculation routines. And it also covers interoperability between standard VB COM, ATL COM, raw C++ COM (I feel your pain) and the .NET languages (C#, VB).

After an intro chapter, Troelsen gives us a really (no, really) detailed and low-level description of how COM works. I actually learned more about the inner workings of COM from this book than from all the years of working with it. For example, it was always a pain to hunt the registry for wayward DLLs (and their guids) that refuse to unregister peacefully. Troelsen shows us exactly where to do this. Another cool example demonstrates how to read COM type information. Really good stuff.

After that you get equally as detailed look into a .NET Server (not the server, the DLL or object or component). And then we come to the meaty part of the book. A full-on press on .NET->COM, COM->.NET going from basic topics to advanced substance, like interacting with IUnknown or doing binary compatibility between versions. Finally, there is a chapter on working with MTS and COM+. This technology will probably be replaced by a native .NET transaction server in the future, so I don't know how important this is.

An interesting side trip (and maybe a discovery) for the reader will be System.CodeDOM namespace and its set of on the fly generation tools.

The bottom line is that if you don't want to part with your existing set of pre .NET libraries, I suggest you run to amazon and get this book.



Want more reviews and sample chapters? Click here.