Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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

PortableDeviceAPI.h

IDL

PortableDeviceAPI.idl

See also

IPortableDeviceServiceMethods Interface

 

 

Community Additions

Show:
© 2017 Microsoft