[This is preliminary documentation and subject to change.]
Obtains a pointer to a call control interface, normally ICancelMethodCalls, on the cancel object corresponding to an outbound COM method call pending on the same or another client thread.
HRESULT CoGetCancelObject(
DWORD dwThreadID, //Thread with pending call
REFIID riid, //ID of requested interface
void **ppUnk //Pointer to requested interface
);
This function supports the standard return values E_FAIL, E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following:
If two or more calls are pending on the same thread through nested calls, the thread ID may not be sufficient to identify the call to be canceled. In this case, CoGetCancelObject returns a cancel interface corresponding to the innermost call that is pending on the thread and has registered a cancel object.
This function does not locate cancel objects for asynchronous calls.
Windows NT: Use version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in objbase.h.
Import Library: Included as a resource in ole32.dll.