IUPnPService::InvokeAction
This method invokes an action of the device.
HRESULT InvokeAction(
BSTR bstrActionName,
VARIANT varInActionArgs,
VARIANT* pvarOutActionArgs,
VARIANT* pvarRetVal
);
Parameters
bstrActionName
[in] Specifies the method to invoke. Method names are case sensitive.varInActionArgs
[in] Specifies an array of input arguments to the method. If the action has no input arguments, this parameter must contain a variant of any type.The contents of this array are service-specific.
pvarOutActionArgs
[in, out] On input, contains a reference to an empty array. Specify NULL if and only if the action being invoked does not have any out parameters, or the action has exactly one out parameter (which is the return value).On output, receives a reference to the array of output arguments. If the action has no output arguments, this parameter contains an empty array.
The contents of this parameter are service-specific.
pvarRetVal
[in, out] On input, contains a pointer to a VARIANT. Specify NULL if the action being invoked does not have a return value. On output, receives a reference to a VARIANT that contains the return value of this action.
Return Values
- S_OK
This method was successful.
Otherwise, the method returns one of the COM error codes defined in WinError.h, or one of the following UPnP-specific return values.
HRESULT value | Description |
---|---|
UPNP_E_ACTION_REQUEST_FAILED | The device had an internal error; the request could not be executed. |
UPNP_E_DEVICE_ERROR | An unknown error occurred. |
UPNP_E_DEVICE_TIMEOUT | The device has not responded within the 30–second time-out period. |
UPNP_E_ERROR_PROCESSING_RESPONSE | The device has sent a response that cannot be processed. For example, the response was corrupted. |
UPNP_E_INVALID_ACTION | The action is not supported by the device. |
UPNP_E_INVALID_ARGUMENTS | One or more of the arguments passed in vInActionArgs is invalid. |
UPNP_E_PROTOCOL_ERROR | An error occurred at the UPnP control protocol level. |
UPNP_E_TRANSPORT_ERROR | An HTTP error occurred. Use the IUPnPService::LastTransportStatus property to obtain the actual HTTP status code. |
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Upnp.h.
Link Library: Uuid.lib.
See Also
Last updated on Saturday, April 10, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.