## EXPORT_SPEC int UpnpSendAction

## ( IN UpnpClient_Handle Hnd,
IN const char* ActionURL,
IN const char* ServiceType,
IN const char* DevUDN,
IN IXML_Document* Action,
OUT IXML_Document** RespNode )

> UpnpSendAction sends a message to change a state variable in a service.

## Documentation

> UpnpSendAction sends a message to change a state variable in a service. This is a synchronous call that does not return until the action is complete.

> Note that a positive return value indicates a SOAP-protocol error code. In this case, the error description can be retrieved from RespNode. A negative return value indicates an SDK error.

Parameters:
  Hnd - The handle of the control point sending the action.
  ActionURL - The action URL of the service.
  - ServiceType The type of the service.
  - DevUDN This parameter is ignored and must be `NULL`.
  Action - The DOM document for the action.
  RespNode - The DOM document for the response to the action. The SDK allocates this document and the caller needs to free it.
Returns:
  [int] An integer representing one of the following:
  - `UPNP_E_SUCCESS`: The operation completed successfully.
  - `UPNP_E_INVALID_HANDLE`: The handle is not a valid control point handle.
  - `UPNP_E_INVALID_URL`: ActionUrl is not a valid URL.
  - `UPNP_E_INVALID_ACTION`: This action is not valid.
  - `UPNP_E_INVALID_DEVICE`: DevUDN is not a valid device.
  - `UPNP_E_INVALID_PARAM`: ServiceType, Action, ActionUrl, or RespNode is not a valid pointer.
  - `UPNP_E_OUTOF_MEMORY`: Insufficient resources exist to complete this operation.

Alphabetic index

This page was generated with the help of DOC++.