IUPnPServiceAsync::EndQueryStateVariable method

The EndQueryStateVariable method retrieves the results of a previous BeginQueryStateVariable operation and retrieves the resultant service-specific state variable value.

Syntax


HRESULT EndQueryStateVariable(
  [out, retval]  VARIANT *pValue,
  [in]           ULONG64 *ullRequestID
);

Parameters

pValue [out, retval]

On input, contains an empty array. On output, receives a reference to the value of the variable specified in BeginQueryStateVariable by bstrVariableName. The type of the data returned depends on the state variable for which the query was invoked.

Note  Clear this parameter with VariantClear.

ullRequestID [in]

Pointer to a 64-bit ULONG value that corresponds to the BeginQueryStateVariable operation initiated prior to this call.

Return value

Returns S_OK on success. Otherwise, the method returns a COM error code defined in WinError.h or one of the following values:

Return codeDescription
UPNP_E_DEVICE_ERROR

The state 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_INVALID_VARIABLE

The requested state variable does not exist.

UPNP_E_DEVICE_TIMEOUT

The device has not responded within the 30 second time-out period.

UPNP_E_INVALID_ARGUMENTS

One or more of the arguments passed with vInActionArgs is invalid.

UPNP_E_PROTOCOL_ERROR

The query did not complete because of problems at the UPnP protocol level.

UPNP_E_TRANSPORT_ERROR

The state variable is not evented and the remote query for the value failed because of an HTTP problem. To retrieve the HTTP error code, use IUPnPService::LastTransportStatus.

UPNP_E_VARIABLE_VALUE_UNKNOWN

The state variable is evented, but the UPnP software cannot return a value because it is still waiting for an event notification.

 

Note  Some values can indicate that an error was received from a UPnP-certified device. For more information, see Device Error Codes.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Upnp.h

DLL

Upnp.dll

See also

IUPnPServiceAsync
IUPnPServiceAsync::EndQueryStateVariable
IUPnPService::LastTransportStatus

 

 

Community Additions

ADD
Show:
© 2014 Microsoft