IMbnDeviceService::QueryCommand method (mbnapi.h)
Important
Starting in Windows 10, version 1803, the Win32 APIs described in this section are replaced by the Windows Runtime APIs in the Windows.Networking.Connectivity namespace.
Sends a QUERY control command to the device service of a Mobile Broadband device.
Syntax
HRESULT QueryCommand(
[in] ULONG commandID,
[in] SAFEARRAY *deviceServiceData,
[out] ULONG *requestID
);
Parameters
[in] commandID
An identifier for the command.
[in] deviceServiceData
A byte array that is passed in to the device.
[out] requestID
A unique request ID assigned by the Mobile Broadband service to identify this request.
Return value
The method can return one of the following values.
Return code | Description |
---|---|
|
The method completed successfully. |
|
This device service command is not allowed for calling process privileges. |
|
An error was encountered when executing this method. |
Remarks
QueryCommand exists to implement vendor-specific device service functionality which is not otherwise covered in the Mobile Broadband API. The command session on a device service must be opened before the application can call QueryCommand.
The Mobile Broadband service will issue a QUERY request to the device. deviceServiceData will be copied byte-by-byte into the data buffer passed in to the request. This data buffer must not be more than MaxCommandSize bytes.
This is an asynchronous operation and QueryCommand will return immediately. On completion of the operation, the Mobile Broadband service will call the OnQueryCommandComplete method of the IMbnDeviceServicesEvents interface.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps | UWP apps] |
Minimum supported server | None supported |
Target Platform | Windows |
Header | mbnapi.h |