CoGetStdMarshalEx function (combaseapi.h)
Creates an aggregated standard marshaler for use with lightweight client-side handlers.
Syntax
HRESULT CoGetStdMarshalEx(
[in] LPUNKNOWN pUnkOuter,
[in] DWORD smexflags,
[out] LPUNKNOWN *ppUnkInner
);
Parameters
[in] pUnkOuter
A pointer to the controlling IUnknown.
[in] smexflags
One of two values indicating whether the aggregated standard marshaler is on the client side or the server side. These flags are defined in the STDMSHLFLAGS enumeration.
Value | Meaning |
---|---|
|
Indicates a server-side aggregated standard marshaler. |
|
Indicates a client-side (handler) aggregated standard marshaler. |
[out] ppUnkInner
On successful return, address of pointer to the IUnknown interface on the newly-created aggregated standard marshaler. If an error occurs, this value is NULL.
Return value
This function returns S_OK.
Remarks
The server calls CoGetStdMarshalEx passing in the flag SMEXF_SERVER. This creates a server side standard marshaler (known as a stub manager). The handler calls CoGetStdMarshalEx passing in the flag SMEXF_HANDLER. This creates a client side standard marshaler (known as a proxy manager). Note that when calling this function, 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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | combaseapi.h (include Objbase.h) |
Library | Ole32.lib |
DLL | Ole32.dll |