Share via


ComPtr::AsIID Method

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

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

Reference

ComPtr Class