Com Inter Op

ComInterOp is the bridging technology between MicrosoftDotNet and DistributedInternetArchitecture.

Without this, the availability of DotNet would be pushed years out into the future, as DotNet business applications cannot function well without the facilities provided by ComPlus.


Following two paragraphs taken out from a MicroSoft WindowsVista preliminary documentation called PInvoke and COM Interoperability, but I think the functionality is already there with the DotNet 1.1 introduced in 2003. See http://longhorn.msdn.microsoft.com/lhsdk/ndp/vcmg_part2start.aspx

In contrast to languages like C# and Visual Basic, where explicitly using the PInvoke mechanism is the only option, developers using Managed Extensions for C++ generally do not have to do this extra work and can just call unmanaged APIs by including the header file and linking with the import library. This feature is called "It Just Works", or IJW.

Managed Extensions can also be used to directly wrap the underlying C++ class of a COM object. This can provide better performance than using the COM interface and a runtime callable wrapper (RCW) because there can be less interoperability overhead and much closer control of how members are wrapped. For some COM objects, it may not be possible to use the Type Library Importer (Tlbimp.exe) to create an assembly for the COM object, and using Managed Extensions to write a custom wrapper provides a solution for this.


ComInterOp also includes the mechanisms to invoke DotNet components from DistributedInternetArchitecture applications through a wrapper called Com Callable Wrapper (CCW). Strictly speaking, the ItJustWorks IJW (and maybe PInvoke) mechanism described in the above paragraph may not be part of ComInterOp as envisaged in the original DotNet framework implementation. See ManagedCeePlusPlus


See also MicrosoftManagedCode


Resources

http://blogs.msdn.com/DotNetInterop/

SamGentile has an article claiming substantial complexity in use of ComInterOp at http://radio.weblogs.com/0105852/stories/2002/06/08/isComInteropFundamentallyFlawed.html.


ComInterOp QuickQuestions

Q Is the problem between COM infrastructure relying on precise knowledge that objects are destroyed and the managed code way of non-deterministic cleanup resolved easily now?

A Yes.


CategoryDotNet


EditText of this page (last edited September 4, 2006) or FindPage with title or text search