COM
Expand Minimize

CoGetStdMarshalEx function

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

pUnkOuter [in]

A pointer to the controlling IUnknown.

smexflags [in]

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.

ValueMeaning
SMEXF_SERVER
0x01

Indicates a server-side aggregated standard marshaler.

SMEXF_HANDLER
0x0

Indicates a client-side (handler) aggregated standard marshaler.

 

ppUnkInner [out]

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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Objbase.h

Library

Ole32.lib

DLL

Ole32.dll

See also

IMarshal
IStdMarshalInfo
The Lightweight Client-Side Handler

 

 

Community Additions

ADD
Show:
© 2014 Microsoft