简体   繁体   English

从 Windows 中的 MFC 应用程序切换登录用户会话事件捕获

[英]Switch logged in User Session Event capture from MFC Application in Windows

I have an MFC dialog based application.我有一个基于 MFC 对话框的应用程序。 Please anyone tell me how to capture the Switch user(windows logged in user) event from this MFC program.请任何人告诉我如何从这个 MFC 程序捕获切换用户(Windows 登录用户)事件。

I tried to capture the WM_QUERYENDSESSION from the Dialog's WindowProc function and I could able to capture the Shutdown, Restart and log off events using WM_QUERYENDSESSION.我试图从对话框的 WindowProc 函数中捕获 WM_QUERYENDSESSION,我可以使用 WM_QUERYENDSESSION 捕获关闭、重新启动和注销事件。 But the "Switch user" event is not getting called with WM_QUERYENDSESSION.但是 WM_QUERYENDSESSION 不会调用“切换用户”事件。

Any help is much appreciated.任何帮助深表感谢。

Have a look at the WM_WTSSESSION_CHANGE message.查看WM_WTSSESSION_CHANGE消息。 Your application needs to call WTSRegisterSessionNotification() to receive this message.您的应用程序需要调用WTSRegisterSessionNotification()来接收此消息。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 是否有任何事件可以吸引人们关注MFC中的按钮控件? - Is there any event to capture focus on a button control in mfc? 运行应用程序时可以更改登录(Windows)用户吗? - Can I Change the Logged-In (Windows) User While an Application is Running? Windows登录用户唯一ID - Windows logged in user unique ID 从 OpenSSH session 在 Windows 上的用户 session 中启动一个进程 - Start a process in a user session on Windows from an OpenSSH session 获取Windows中登录用户的用户名/密码 - Getting user name/password of the logged in user in Windows 在Windows 7中,是否可以在没有用户登录的情况下获取GUI应用程序主窗口的标题? 我知道,立即回答是否定的 - In Windows 7, is it possible to grab the title of the main window of a GUI application without a user being logged in? I know, immediate answer is no 是否可以从Win32或MFC应用程序的Windows中获取“磁盘空间不足”通知? - Is it possible to get “Low Disk Space” notification from windows in win32 or MFC application? 如何在 Windows 应用程序中捕获 ossPrint? - How to capture ossPrint in a Windows application? 获取当前登录的 Windows 用户 - Getting the currently logged-in windows user 使用SYSTEM级别进程(Windows Service)中已登录的用户上下文模拟并运行任何方法: - Impersonate and run any method using a logged in user context from SYSTEM level process (Windows Service):
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM