SetSuspendState()挂起,为什么?
我想知道为什么会发生以下情况?
我需要注销用户然后让计算机进入睡眠状态。我执行以下操作(C++/WinAPI):(
从本地系统服务调用以下内容):
WTSLogoffSession(WTS_CURRENT_SERVER_HANDLE, dwUserSessionID, TRUE);
SetSuspendState(FALSE, TRUE, FALSE);
但是当我在 Windows Vista 上运行此代码时,SetSuspendState() 挂起并且永远不会返回。同时系统也不会进入睡眠模式。
I was wondering why the following happens?
I need to log off users and then put computer to sleep. I do the following (C++/WinAPI):
(Calling the following from the local system service):
WTSLogoffSession(WTS_CURRENT_SERVER_HANDLE, dwUserSessionID, TRUE);
SetSuspendState(FALSE, TRUE, FALSE);
But when I run this code on Windows Vista, SetSuspendState() hangs up and never returns. At the same time the system does not enter sleep mode either.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论