开发者

How to supply a password to POWER_STATE_PASSWORD?

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.


I'm not sure what you're asking. My guess is that the state has gone through a timeout that would then bring you to a password screen when you try to use it again. If you don't have that option set, then it's probably meaningless.

If you do have it set, then the password is the one set in the Control Panel.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜