IUPnPServiceAsync::BeginInvokeAction method (upnp.h)

The BeginInvokeAction method invokes an action on a device in asynchronous mode. Additionally, if a delayed SCPD download and event subscription is opted-in, and it has not taken place already, this method will initiate SCPD download.

Syntax

HRESULT BeginInvokeAction(
  [in]           BSTR             bstrActionName,
  [in]           VARIANT          vInActionArgs,
  [in, optional] IUPnPAsyncResult *pAsyncResult,
  [out]          PULONG64         pullRequestID
);

Parameters

[in] bstrActionName

Specifies the method to invoke.

[in] vInActionArgs

Specifies an array of input arguments to the method. If the action has no input arguments, this parameter must contain an empty array. The contents of this array are service-specific.

[in, optional] pAsyncResult

Pointer to a IUPnPAsyncResult object. When the BeginInvokeAction call is complete, UPnP will use the IUPnPAsyncResult::AsyncOperationComplete method to notify the control point.

[out] pullRequestID

Pointer to a 64-bit ULONG value used to identify the asynchronous I/O operation. The control point must use this handle as a cookie while ending or cancelling this operation with EndInvokeAction.

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_PENDING
Another async operation is being done on this IUPnPServiceAsync object. Create another IUPnPServiceAsync instance or cancel the running operation by using IUPnPServiceAsync::CancelAsyncOperation.
E_FAIL
Failed to initiate the operation.
UPNP_E_INVALID_ACTION
This action is not supported by the device.
 
Note  Some values can indicate that an error was received from a UPnP-certified device. For more information, see Device Error Codes.
 

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::EndInvokeAction