The IMarshal interface of the com.ms.com package enables a COM object to define and manage the marshaling of its interface pointers. The alternative is to use COM's default implementation, which is the preferred choice in all but a few special cases.
Note The IMarshal interface was added as of versions 2925 through 3167 of the Microsoft virtual machine.
public interface IMarshal extends IUnknown { // Methods public _Guid GetUnmarshalClass(_Guid riid, IUnknown pv, int dwDestContext, int pvDestContext, int mshlflags); public int GetMarshalSizeMax(_Guid riid, IUnknown pv, int dwDestContext, int pvDestContext, int mshlflags); public void MarshalInterface(IStream pStm, _Guid riid, IUnknown pv, int dwDestContext, int pvDestContext, int mshlflags); public IUnknown UnmarshalInterface(IStream pStm, _Guid riid); public void ReleaseMarshalData(IStream pStm); public void DisconnectObject(int dwReserved); } IUnknown | +--IMarshal