I am trying to figure out how to monitor the battery level on a CE Device. The idea is once the battery gets to a certain level it will backup it's database onto a storage card and prompt the user to recharge.

I read the following article:

http://msdn.microsoft.com/library/de...l/sdeforvb.asp

See "Windows CE API"

I have put all this code into my program and it complies fine, but when I try to run it the device crashes with "Not Supported" Exception.