IUPnPServiceAsync::CancelAsyncOperation method (upnp.h)

The CancelAsyncOperation method cancels a pending asynchronous operation initiated by the BeginInvokeAction, BeginQueryStateVariable, BeginSubscribeToEvents, or BeginSCPDDownload methods.

Syntax

HRESULT CancelAsyncOperation(
  [in] ULONG64 ullRequestID
);

Parameters

[in] ullRequestID

A 64-bit ULONG value that corresponds to the pending asynchronous UPnP operation.

Return value

Returns S_OK on success. Otherwise, the method returns a COM error code defined in WinError.h or one of the following values:

Return code Description
E_FAIL
Failed to cancel the asynchronous operation.
E_INVALIDARG
ullRequestID does not match the pending asynchronous call.

Remarks

Calling this method for a pending BeginSCPDDownload operation the SCPD download will still take place in the background, but will not notify callbacks of events associated with the operation.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header upnp.h
DLL Upnp.dll

See also

IUPnPServiceAsync

IUPnPServiceAsync::BeginInvokeAction

IUPnPServiceAsync::BeginQueryStateVariable

IUPnPServiceAsync::BeginSCPDDownload

IUPnPServiceAsync::BeginSubscribeToEvents