## EXPORT_SPEC int UpnpSendActionAsync

## ( IN UpnpClient_Handle Hnd,
IN const char* ActionURL,
IN const char* ServiceType,
IN const char* DevUDN,
IN IXML_Document* Action,
IN Upnp_FunPtr Fun,
IN const void* Cookie )

> UpnpSendActionAsync sends a message to change a state variable in a service, generating a callback when the operation is complete.

## Documentation

> UpnpSendActionAsync sends a message to change a state variable in a service, generating a callback when the operation is complete. See UpnpSendAction for comments on positive return values. These positive return values are sent in the event struct associated with the `UPNP_CONTROL_ACTION_COMPLETE` event.

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 to perform on this device.
  Fun - Pointer to a callback function to be invoked when the operation completes.
  Cookie - Pointer to user data that to be passed to the callback when invoked.
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 an invalid URL.
  - `UPNP_E_INVALID_DEVICE`: DevUDN is an invalid device.
  - `UPNP_E_INVALID_PARAM`: Either Fun is not a valid callback function or ServiceType, Act, or ActionUrl is `NULL`.
  - `UPNP_E_INVALID_ACTION`: This action is not valid.
  - `UPNP_E_OUTOF_MEMORY`: Insufficient resources exist to complete this operation.

Alphabetic index

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