SystemState library for WM 5.0 and later

agraham

Expert
Licensed User
Longtime User
Windows Mobile 5.0 introduced an API known as the State and Notifications Broker for querying many device settings and raising events when these settings change.

This library enables Basic4ppc to use that API. A list of the settings available is in the help file together with a link to the Microsoft online documentation.

This library requires WM 5.0 or later and .NET 2.0. For technical reasons this library cannot at the moment be merged so there is no source code included with this initial release as putting the source code in the Libraries folder would raise compilation errors.

EDIT :- Source archive added for merging on device compile. See post #5 for how.
 

Attachments

  • SystemState1.0.zip
    22.2 KB · Views: 374
  • SystemState1.0_Source.zip
    1.1 KB · Views: 78
Last edited:

Mr_Gee

Active Member
Licensed User
Longtime User
Hi Agraham,
I was just playing around with the same lib using SharpDevelop :)

This was/is my first attempt in creating a DLL and
I got the BatteryState, Strength and DLL version working so far.

then I noticed your post when I was searching for systemstate...
Could you post your .cs file, just for me to see what you did differently

Thanks
:)
 

agraham

Expert
Licensed User
Longtime User
You can now merge the this library in the device executable. Download the source archive in the first post, unzip it and copy the source file to the Basic4ppc libraries folder. Usually it is C:\Program Files\Anywhere Software\Basic4ppc Desktop\Libraries

As this library references two "non-standard" libraries you also need to have these files in the Basic4ppc libraries folder. They are

Microsoft.WindowsMobile.Status.dll
Microsoft.WindowsMobile.dll

You should use the WM5.0 files for preference.

If you have the Windows Mobile 5.0 SDK
- Copy those two dll files from C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Designtimereferences to the Basic4ppc libraries folder:


If you have the Windows Mobile 6.0 SDK
- Copy those two dll files from C:\Program Files\Windows Mobile 6 SDK\Managed Libraries to the Basic4ppc libraries folder:


If you don't have Visual Studio you may not be able to install the SDKs to get the dlls so you can get the WM5.0 files from Taximanias website www.taximania.net Look for the line "If there's a download you require that's not available, Look here", click it and download WindowsMobileFiles.zip.


After compilation a message will say that Microsoft.WindowsMobile.*** should be distributed with the executable. However there is no need to distribute these files.
 

cactus

Member
Licensed User
Longtime User
Hi agraham,

Really, great work. Thanks!

I'm off to find out how to get SystemState can tell me ACLine is connected :)

Cheers,
/Cacti
 
Top