如何向 POWER_STATE_PASSWORD 提供密码?
我正在尝试获取我的 Windows 移动设备的电源状态。
这些状态定义为:
#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.
我得到 0x10010000 。所以我设置了 POWER_STATE_ON 和 POWER_STATE_PASSWORD 。
当我的设备进入空闲状态时,我会收到此消息(我正在使用 RequestPowerNotifications 来获取该通知)。您可以在此处查看我使用的示例。
由于它处于闲置状态,我相当确定还有更多信息我没有得到。
所以我的问题是“我如何提供密码”?密码是什么? (我的代码在我公司拥有的 Symbol/Motorola 设备上运行,因此我应该能够获取密码,无论它是什么。)
我使用的是 C#、Visual Studio 2008 和 CF3.5。
任何帮助(在这个问题上)将是最有帮助的。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定你在问什么。我的猜测是,该状态已经超时,当您尝试再次使用它时,会将您带到密码屏幕。如果您没有设置该选项,那么它可能毫无意义。
如果您确实设置了密码,那么密码就是在控制面板中设置的密码。
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.