Skip to content

Latest commit

 

History

History
99 lines (77 loc) · 3.67 KB

nf-combaseapi-cogetinterfaceandreleasestream.md

File metadata and controls

99 lines (77 loc) · 3.67 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:combaseapi.CoGetInterfaceAndReleaseStream
CoGetInterfaceAndReleaseStream function (combaseapi.h)
Unmarshals a buffer containing an interface pointer and releases the stream when an interface pointer has been marshaled from another thread to the calling thread.
CoGetInterfaceAndReleaseStream
CoGetInterfaceAndReleaseStream function [COM]
_com_CoGetInterfaceAndReleaseStream
com.cogetinterfaceandreleasestream
combaseapi/CoGetInterfaceAndReleaseStream
com\cogetinterfaceandreleasestream.htm
com
b529f65f-3208-4594-a772-d1cad3727dc1
12/05/2018
CoGetInterfaceAndReleaseStream, CoGetInterfaceAndReleaseStream function [COM], _com_CoGetInterfaceAndReleaseStream, com.cogetinterfaceandreleasestream, combaseapi/CoGetInterfaceAndReleaseStream
combaseapi.h
Objbase.h
Windows
Windows 2000 Professional [desktop apps \| UWP apps]
Windows 2000 Server [desktop apps \| UWP apps]
Ole32.lib
Ole32.dll
Windows
19H1
CoGetInterfaceAndReleaseStream
combaseapi/CoGetInterfaceAndReleaseStream
c++
APIRef
kbSyntax
DllExport
Ole32.dll
API-MS-Win-Core-Com-l1-1-0.dll
ComBase.dll
API-MS-Win-Core-Com-l1-1-1.dll
API-MS-Win-DownLevel-Ole32-l1-1-0.dll
API-MS-Win-DownLevel-Ole32-l1-1-1.dll
CoGetInterfaceAndReleaseStream

CoGetInterfaceAndReleaseStream function

-description

Unmarshals a buffer containing an interface pointer and releases the stream when an interface pointer has been marshaled from another thread to the calling thread.

-parameters

-param pStm [in]

A pointer to the IStream interface on the stream to be unmarshaled.

-param iid [in]

A reference to the identifier of the interface requested from the unmarshaled object.

-param ppv [out]

The address of pointer variable that receives the interface pointer requested in riid. Upon successful return, *ppv contains the requested interface pointer to the unmarshaled interface.

-returns

This function can return the standard return values S_OK and E_INVALIDARG, as well as any of the values returned by CoUnmarshalInterface.

-remarks

Important  

Security Note: Calling this method with untrusted data is a security risk. Call this method only with trusted data.

 
The CoGetInterfaceAndReleaseStream function performs the following tasks:
  • Calls CoUnmarshalInterface to unmarshal an interface pointer previously passed in a call to CoMarshalInterThreadInterfaceInStream.
  • Releases the stream pointer. Even if the unmarshaling fails, the stream is still released because there is no effective way to recover from a failure of this kind.

-see-also

CoMarshalInterThreadInterfaceInStream

CoUnmarshalInterface