Posts

Showing posts with the label INTEROPERABILITY

INTEROPERABILITY (RCW and CCW)

Image
 Interoperability: .NET enables interoperability with unmanaged code through platform invoke services, the System.Runtime.InteropServices namespace, C++ interoperability, and COM interoperability (COM interop). a) Code that executes under the control of the runtime is called managed code.  b) Code that runs outside the runtime is called unmanaged code.  c) COM components, ActiveX interfaces, and Windows API functions are examples of unmanaged code. Runtime Callable Wrapper(RCW): a) The common language runtime exposes COM objects through a proxy called the runtime callable wrapper (RCW).  b) Although the RCW appears to be an ordinary object to .NET clients, its primary function is to marshal calls between a .NET client and a COM object. c) The runtime creates exactly one RCW for each COM object, regardless of the number of references that exist on that object.  d) If you create an RCW in one application domain or apartment, and then pass a reference to another ap...