Creates an aggregated standard marshaler for use with lightweight client-side handlers.
HRESULT CoGetStdMarshalEx(
IUnknown * pUnkOuter, //Pointer to the controlling IUnknown
DWORD dwSMEXFlags, //Indicates whether marshaler is client- or server-side
IUnknown ** ppUnkInner, //Address of IUnknown pointer on aggregated marshaler
);
typedef enum tagSTDMSHLFLAGS
{
SMEXF_SERVER = 0x01, //server side aggregated std marshaler
SMEXF_HANDLER = 0x02 //client side (handler) agg std marshaler
} STDMSHLFLAGS;
The server calls CoGetStdMarshalEx passing in the flag SMEXF_SERVER. This creates a server side standard marshaler (a.k.a. a stub manager). The handler calls CoGetStdMarshalEx passing in the flag SMEXF_HANDLER. This creates a client side standard marshaler (a.k.a. a proxy manager). Note that when calling this API, the handler must pass the original controlling unknown that was passed to the handler when the handler was created. This will be the system implemented controlling unknown. Failure to pass the correct IUnknown results in an error returned. On success, the ppUnkInner returned is the controlling unknown of the inner object. The server and handler must keep this pointer, and may use it to call IUnknown::QueryInterface for the IMarshal interface.
Windows NT: Use version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in objbase.h.
Import Library: Included as a resource in ole32.dll.
IStdMarshalInfo, IMarshal, Lightweight Client-side Handlers