Understanding COM and .NET Interoperability
Moreover, you do not need to make use of the other components entirely. .Net has the capability to use even a small part of other components with your existing code. The flexibility or the interoperability between COM and .Net allows you to either use COM component from .Net or use .Net components from COM. To use COM components from .Net there is a tool that takes a COM component or type library and creates a managed assembly also called Runtime Callable Wrapper (RCW). This wrapper assembly is the DLL file created by tlbimp.exe or the VS.NET IDE. Similarly to use .Net components from COM you can use the wrapper class that organizes the COM calls through to the managed code. In addition, you should create interfaces for .Net components to be available in COM. These interfaces can be created either manually or automatically.
You can make use of existing COM components by using late-bound and early-bound references. Both late-bound and early-bound references are objects that are created and set to object types. The difference between them is that late-bound reference is set to object type at runtime and early-bound reference is set to object type at design time. Moreover, the late-bound COM reference is used by writing Server.CreateObject() method and the early-bound COM reference uses a built-in utility that creates a proxy class.
to our mailing list and receive new articles Note
: We never rent, trade, or sell my email lists to Visit
.NET Programming Tutorial Homepage ______________________________________________________
through email. Keep yourself updated with latest
developments in the industry.
anyone. We assure that your privacy is respected
to our mailing list and receive new articles
: We never rent, trade, or sell my email lists to
Visit .NET Programming Tutorial Homepage