OnRadioPowerTransition (Compact 7)
3/12/2014
This function is invoked by Shell in response to a wireless device power state change event.
Syntax
HRESULT OnRadioPowerTransition(
RADIODEVTYPE RadioType,
TCHAR* szDeviceName,
DWORD dwNewState,
BOOL* pfUseDefaultProcessing
);
Parameters
- RadioType
[in] Specifies the type of wireless device. The possible values are defined in the RADIODEVTYPE enumeration.
- szDeviceName
[in] Specifies the friendly name of the wireless device.
- dwNewState
[in] Specifies the new power state to which the device is transitioning.
- pfUseDefaultProcessing
[out] Specifies whether or not Shell should proceed with default processing of the power state change event. TRUE indicates that the default processing will continue.
Return Values
The following table shows the return values for this function.
Value | Description |
---|---|
S_OK |
Radio power state change event was handled correctly. |
E_FAIL |
In the case of failure, the default handling of radio power state change events will occur. |
Other error messages are possible and depend on the specific radio devices.
Remarks
This function allows the OEM to receive notification before Wireless Power Manager changes the power state of a wireless device. This function runs in a synchronous context within Shell.
Note
Because this function is synchronous, you must return from this function as soon as possible.
If the function is not implemented, returns E_FAIL, or the pfUseDefaultProcessing parameter receives TRUE, Shell acts based on values indicated by RadioType and dwNewState. If pfUseDefaultProcessing receives FALSE, Shell assumes that the OEM has taken all action necessary and does not take any action.
This function can also be used to allow the OEM to override the default action taken by Wireless Power Manager.
To implement this function, specify the module that will contain this function. This is stored in the registry.
[HKLM\System\CurrentControlSet\Control\Power\OnRadioPowerTransition]
"DLLName"=<DLL that loads the function>
Wireless Power Manager attempts to load OnRadioPowerTransition by name from the DLL referenced in the registry key. If this operation is successful the function will be called before each power state change.
Requirements
Header |
wrlspwr.h |
Library |
ossvcs.lib |