IUPnPService::QueryStateVariable (Windows CE 5.0)
This method returns the value of one of the service's state variables.
HRESULT QueryStateVariable(BSTRbstrVariableName,VARIANT* pvarValue);
Parameters
- bstrVariableName
[in] Specifies the state variable for which to return a value. All variable names are case sensitive. - pvarValue
[out] Receives a reference to the value of the variable specified by bstrVariableName. The type of the data returned depends on the state variable for which the query was invoked.
Return Values
- S_OK
This method was successful.
Otherwise, the method returns either one of the COM error codes defined in WinError.h, or one of the following UPnP-specific return values.
UPnP-specific return value | Description |
---|---|
UPNP_E_DEVICE_ERROR | Variable is not evented and the remote query returned an error code. This is not a transport error; the device received the request, but it returned an error. |
UPNP_E_DEVICE_TIMEOUT | The device has not responded within the 30–second time-out period. |
UPNP_E_INVALID_VARIABLE | Variable does not exist. |
UPNP_E_PROTOCOL_ERROR | Query was not completed because of problems at the UPnP protocol level. |
UPNP_E_TRANSPORT_ERROR | Variable is not evented and the remote query for the value failed because of an HTTP problem. Use IUPnPService::LastTransportStatus to retrieve the HTTP error code. |
Remarks
The UPnP Forum discourages use of this method. If possible, use a service-specific action, if one has been provided.
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Upnp.h.
Link Library: Uuid.lib.
See Also
IUPnPService:IDispatch | IUPnPService::LastTransportStatus
Send Feedback on this topic to the authors