AtlMarshalPtrInProc

HRESULT AtlMarshalPtrInProc( IUnknown* pUnk, const IID& iid, IStream** ppStream );

Return Value

A standard HRESULT value.

Parameters

pUnk

[in] A pointer to the interface to be marshaled.

iid

[in] The GUID of the interface being marshaled.

ppStream

[out] A pointer to the IStream interface on the new stream object used for marshaling.

Remarks

Creates a new stream object, writes the CLSID of the proxy to the stream, and marshals the specified interface pointer by writing the data needed to initialize the proxy into the stream. The MSHLFLAGS_TABLESTRONG flag is set so the pointer can be marshaled to multiple streams. The pointer can also be unmarshaled multiple times.

If marshaling fails, the stream pointer is released.

AtlMarshalPtrInProc can only be used on a pointer to an in-process object.

ATL Macros and Global Functions

See Also

AtlUnmarshalPtr, AtlFreeMarshalStream, MSHLFLAGS in the Win32 SDK