Share via


ComPtr::AsIID Method

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at ComPtr::AsIID Method.

Returns a ComPtr object that represents the interface identified by the specified interface ID.

Syntax

WRL_NOTHROW HRESULT AsIID(  
   REFIID riid,  
   _Out_ ComPtr<IUnknown>* p  
) const;  

Parameters

riid
An interface ID.

p
If supported, a doubly-indirect pointer to the interface specified by the riid parameter; otherwise, a pointer to IUnknown.

Return Value

S_OK if successful; otherwise, an HRESULT that indicates the error.

Requirements

Header: client.h

Namespace: Microsoft::WRL

See Also

ComPtr Class