The runtime’s marshaler is used by both PInvoke and COM Interop. Both services provide interoperability with unmanaged code and therefore both services rely heavily on the marshaler. The two services are similar, the main difference being that PInvoke is used to access static DLL entry points while COM Interop is used to interact with COM interfaces. At the lowest levels, both service use the same marshaler. For details on these two services, see the COM Interoperability Specification and the Platform Invocation Services User Guide.
In general, the marshaler provides the same features to both COM Interop and PInvoke. However, there are some data types that are only supported by PInvoke or COM Interop. Those types are identified throughout his document.