CoGetStdMarshalEx

[DllImport("ole32.dll", SetLastError = true)]
public static extern int CoGetStdMarshalEx(
   IUnknown pUnkOuter,
   uint smexflags,
   out IntPtr ppMarshal
);

Microsoft documentation: Link

Last updated