The common language runtime(CLR) provides two mechanisms for interoperating with unmanaged code:
• Platform invoke, which enables managed code to call functions exported from an unmanaged library.
• COM interop, which enables managed code to interact with COM objects through interfaces.
Both platform invoke and COM interop use interop marshaling to accurately move method arguments between caller and callee and back, if required.
Asked In: Many Interviews |