IUnknown::QueryInterfaceHRESULT IUnknown::QueryInterface (REFIID riid, LPVOID FAR *ppvObj); Retrieves the address of a specified interface on a particular object so that an application can query an object to determine what interfaces it supports.· Returns NOERROR if successful, or one of these error values:CO_E_OBJNOTCONNECTED E_NOINTERFACE E_OUTOFMEMORY E_INVALIDARG E_UNEXPECTED REGDB_E_IIDNOTREG riid[in] Interface identifier of the interface to be retrieved. ppvObj[out] Address of a variable that receives the address of the specified interface on the object. If the interface specified in riid is not supported by the object, the function returns E_NOINTERFACE. All errors set *ppvObj to NULL.
IHTMLDocument2* pDocument = NULL; ASSERT(pDisp != NULL );
pDisp->QueryInterface(IID_IHTMLDocument2, ( LPVOID* )&pDocument);
ASSERT(pDocument);
Retrieves the address of a specified interface on a particular object so that an application can query an object to determine what interfaces it supports.· Returns NOERROR if successful, or one of these error values:CO_E_OBJNOTCONNECTED
E_NOINTERFACE
E_OUTOFMEMORY
E_INVALIDARG
E_UNEXPECTED
REGDB_E_IIDNOTREG
riid[in] Interface identifier of the interface to be retrieved.
ppvObj[out] Address of a variable that receives the address of the specified interface on the object. If the interface specified in riid is not supported by the object, the function returns E_NOINTERFACE. All errors set *ppvObj to NULL.