ChangeWirelessState (Compact 2013)
3/26/2014
This function changes the global power state of all wireless devices.
Syntax
HRESULT ChangeWirelessState(
BOOL bOn
);
Parameters
- bOn
[in] New power state value. TRUE restores the device to the desired state; FALSE turns OFF all wireless devices.
Return Value
The following table shows the return values for this function.
Value |
Description |
---|---|
S_OK |
Successfully set the state of the radio. |
E_FAIL |
Radio state could not be changed. |
S_FALSE |
Radio was already in the desired state. |
Remarks
This function changes the state of all the wireless devices available in the system to the specified state. If FALSE is passed in bOn and the desired state of the wireless device is set to TRUE, this function saves the old state in the registry before changing the state. If TRUE is passed in bOn, the device is turned on only if the desired state is set to TRUE in the registry.
You can get the global state by calling the GetWirelessState function.
Requirements
Header |
wrlspwr.h |
Library |
ossvcs.lib |