Code Repo    |     RSS
MD's Technical Sharing



Monday, May 25, 2009

Accessing wifi hardware status via Microsoft.WindowsMobile.Status.SystemState

The State and Notification Broker in WM6 supports the following new properties (not present in WM5 SDK)

* BluetoothStateA2DPConnected
* BluetoothStateDiscoverable
* BluetoothStateHandsFreeAudio
* BluetoothStateHandsFreeControl
* BluetoothStateHardwarePresent
* BluetoothStatePowerOn

and

* WiFiStateConnected
* WiFiStateConnecting
* WiFiStateHardwarePresent
* WiFiStateNetworksAvailable
* WiFiStatePowerOn

To use these properties, you must add a reference to Microsoft.WindowsMobile.Status found in C:\Program Files\Windows Mobile 6 SDK\Managed Libraries\Microsoft.WindowsMobile.Status.dll (that is, the WM6 SDK), and not another DLL having the same name found in C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\DesignTimeReferences\Microsoft.WindowsMobile.PocketOutlook.dll (which is for WM5 SDK). If you mistakenly add the WM5 SDK's DLL, you won't be able to access these properties.

Reference:

What's New For Managed Developers In Windows Mobile 6

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.