IPortableDeviceServiceMethods::Cancel method
The Cancel method cancels a pending method invocation.
Syntax
HRESULT STDMETHODCALLTYPE Cancel(
[in] IPortableDeviceServiceMethodCallback *pCallback
);
Parameters
- pCallback [in]
-
A pointer to the callback object whose method invocation is to be canceled, or NULL to cancel all pending method invocations.
Return value
If the method succeeds, it returns S_OK. Any other HRESULT value indicates that the call failed.
Remarks
A callback object identifies a method invocation. If the same callback object is reused for multiple calls to the InvokeAsync method, all method invocations arising from these calls will be cancelled.
To enable targeted cancellation of a specific method invocation, pass a unique instance of the IPortableDeviceServiceMethodCallback interface to the InvokeAsync method.
Requirements
|
Minimum supported client | Windows 7 [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server | None supported |
|
Header |
|
|
IDL |
|
See also