[This is preliminary documentation and subject to change.]
Creates a stub manager, also called a marshaler, aggregates the marshaler in a server object, and creates a map of interface pointer IDs (IPIDs) to interface IDs.
WINOLEAPI CoGetStaticMarshal(
IUnknown *pUnkControl, //Server object
DWORD dwFlags, //Reserved for future use
ULONG cItfs, //Size of arIIDs and arIPIDs
IID **arIIDs, //Array of IIDs
UUID **arIPIDs, //Corresponding array of IPIDs
ULONG cBindings, //Size of pBindings
LPUNKNOWN *pBindings, //Array of COM binding objects
IUnknown **ppUnkInner //Marshaler
);
This function supports the standard return values E_FAIL, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following:
The server object calls CoGetStaticMarshal when it is created. CoGetStaticMarshal creates a stub manager and aggregates it into the server object. The server object is responsible for delegating IMarshal method calls to this stub manager.
CoGetStaticMarshal also maps an array of static interface pointer IDs (IPIDs) to a corresponding array of interface IDs (IIDs). In this mapping, an IPID identifies a specific instance of the interface on the server that corresponds to the interface specified by the corresponding IID.
Endpoints must be specified by passing an array of COM binding objects in the pBindings parameter. An endpoint on a process and an IPID identifying an interface pointer are sufficient to fully identify an object. Because static IPIDs do not change, the resulting proxy can marshal calls without requesting interface pointers from the server object, resulting in fewer network round trips and faster performance for each marshaled call.
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.