IUPnPServiceAsync::BeginQueryStateVariable method (upnp.h)
The BeginQueryStateVariable method initiates an asynchronous request for the state variable value from a specific service. Additionally, if opt-in is indicated for a delayed Service Control Protocol Description (SCPD) download and event subscription, and it has not taken place already, this method will initiate SCPD download and event subscription.
Syntax
HRESULT BeginQueryStateVariable(
[in] BSTR bstrVariableName,
[in, optional] IUPnPAsyncResult *pAsyncResult,
[out] PULONG64 pullRequestID
);
Parameters
[in] bstrVariableName
Specifies the requested state variable value.
[in, optional] pAsyncResult
Pointer to a IUPnPAsyncResult object. When the BeginQueryStateVariable call is complete, UPnP will use the IUPnPAsyncResult::AsyncOperationComplete method to notify the control point.
[out] pullRequestID
Pointer to a 64-bit ULONG value used to identify the asynchronous I/O operation. The UPnP control point must use this handle when ending or cancelling this operation with EndQueryStateVariable.
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 code | Description |
---|---|
|
Failed to initiate the asynchronous operation. |
|
The requested state variable, indicated by bstrVariableName, does not exist. |
Remarks
Event subscription should be completed before querying any evented state variables with this method. If this does not occur, UPNP_E_VARIABLE_VALUE_UNKNOWN is returned, and event subscription will take place internally. As a result, the next BeginQueryStateVariable call will succeed.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps only] |
Minimum supported server | Windows Server 2012 [desktop apps only] |
Target Platform | Windows |
Header | upnp.h |
DLL | Upnp.dll |