Platform SDK: TAPI |
Returns a dispatch pointer to a different interface on an object given its GUID and the dispatch pointer of another interface on the object.
HRESULT QueryDispatchInterface( BSTR pIID, IDispatch *pInterfaceToMap, IDispatch **ppReturnedInterface );
Value | Meaning |
---|---|
S_OK | Method succeeded. |
E_OUTOFMEMORY | Insufficient memory exists to perform the operation. |
E_INVALIDARG | The pIID parameter either is not a valid BSTR or does not translate into a valid GUID. |
E_NOINTERFACE | The interface requested is not exposed or the object does not implement the IObjectSafety interface. |
The application must use SysAllocString to allocate memory for the pIID parameter and use SysFreeString to free the memory when the variable is no longer needed.
The Dispatch Mapper will use the object's IObjectSafety interface to make sure the object is safe for scripting on the requested interface. If the object does not implement IObjectSafety, or if the object is not safe on this particular interface, the call will fail.
Windows NT/2000: Requires Windows 2000.
Version: Requires TAPI 3.0 or later.
Header: Declared in Tapi3.h.
Library: Use T3iid.lib.