## EXPORT_SPEC int UpnpRenewSubscriptionAsync

## ( IN UpnpClient_Handle Hnd,
IN int TimeOut,
IN Upnp_SID SubsId,
IN Upnp_FunPtr Fun,
IN const void* Cookie )

> UpnpRenewSubscriptionAsync renews a subscription that is about to expire, generating a callback when the operation is complete.

## Documentation

> UpnpRenewSubscriptionAsync renews a subscription that is about to expire, generating a callback when the operation is complete.

> Note that many of the error codes for this function are returned in the Upnp_Event_Subscribe structure. In those cases, the function returns `UPNP_E_SUCCESS` and the appropriate error code will be in the Upnp_Event_Subscribe.ErrCode field in the Event structure passed to the callback.

Parameters:
  Hnd - The handle of the control point that is renewing the subscription.
  - TimeOut The requested subscription time. The actual timeout value is returned when the callback function is called.
  SubsId - The ID for the subscription to renew.
  Fun - Pointer to a callback function to be invoked when the renewal is complete.
  Cookie - Pointer to user data passed to the callback function 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_SID`: The SubsId is not a valid subscription ID.
  - `UPNP_E_INVALID_PARAM`: Either Fun is not a valid callback function pointer or Timeout is less than zero but is not `UPNP_INFINITE`.
  - `UPNP_E_OUTOF_MEMORY`: Insufficient resources exist to complete this operation.
  - `UPNP_E_NETWORK_ERROR`: A network error occured (returned in the Upnp_Event_Subscribe.ErrCode field as part of the callback).
  - `UPNP_E_SOCKET_WRITE`: An error or timeout occurred writing to a socket (returned in the Upnp_Event_Subscribe.ErrCode field as part of the callback).
  - `UPNP_E_SOCKET_READ`: An error or timeout occurred reading from a socket (returned in the Upnp_Event_Subscribe.ErrCode field as part of the callback).
  - `UPNP_E_SOCKET_BIND`: An error occurred binding the socket (returned in the Upnp_Event_Subscribe.ErrCode field as part of the callback).
  - `UPNP_E_SOCKET_CONNECT`: An error occurred connecting to PublisherUrl (returned in the Upnp_Event_Subscribe.ErrCode field as part of the callback).
  - `UPNP_E_OUTOF_SOCKET`: An error occurred creating socket ( returned in the Upnp_Event_Subscribe.ErrCode field as part of the callback).
  - `UPNP_E_BAD_RESPONSE`: An error occurred in response from the publisher (returned in the Upnp_Event_Subscribe.ErrCode field as part of the callback).
  - `UPNP_E_SUBSCRIBE_UNACCEPTED`: The publisher refused the subscription request (returned in the Upnp_Event_Subscribe.ErrCode field as part of the callback).

Alphabetic index

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