I am trying to get the powerstate for my windows mobile device.
The states are defined as:
#define POWER_STATE(f) ((f) & 0xFFFF0000) // power state mask
#define POWER_STATE_ON (DWORD)(0x00010000) // on state
#define POWER_STATE_OFF (DWORD)(0x00020000) // no power, full off
#define POWER_STATE_CRITICAL (DWORD)(0x00040000) // critical off
#define POWER_STATE_BOOT (DWORD)(0x00080000) // boot state
#define POWER_STATE_IDLE (DWORD)(0x00100000) // idle state
#define POWER_STATE_SUSPEND (DWORD)(0x00200000) // suspend state
#define POWER_STATE_UNATTENDED (DWORD)(0x00400000) // Unattended state.
#define POWER_STATE_RESET (DWORD)(0x00800000) // reset state
#define POWER_STATE_USERIDLE (DWORD)(0x01000000) // user idle state
#define POWER_STATE_BACKLIGHTON (DWORD)(0x02000000) // device scree backlight on
#define POWER_STATE_PASSWORD (DWORD)(0x10000000) // This state is password protected.
I am getting 0x10010000. So I have POWER_STATE_ON and POWER_STATE_PASSWORD set.
I get this when my device goes to an idle state (I am using RequestPowerNotifications to get that notification). You can see the example I am using here.
Since it is going idle, I am fairly sure that there is more info that I am not getting.
So my question is "how can I supply the password"? and what is the password? (My code is running on Symbol/Motorola devices owned by my company so I should be able to get the password, what ever it is.)
I am using C#, Visual Studio 2008 and CF3.5.
Any help (on this issue) would be most .... helpful.