在Activex项目中检测注销事件 [英] Detecting LogOff event in Activex Project
本文介绍了在Activex项目中检测注销事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,专家,
Iam面临问题.我需要在系统注销时删除所有指针.我通过在Activex控件类上使用WM_QUERYENDSESSION进行了尝试.但这是行不通的.请帮帮我.
谢谢,
Satheesh.
Hi Experts,
Iam facing a problem. I need to delete all the pointers , when the system log off. I tried it by using WM_QUERYENDSESSION on Activex Control class. But it is not working. Please help me.
Thanks,
Satheesh.
推荐答案
如果您有一个窗口,则可以使用WTSRegisterSessionNotification注册终端服务通知.然后注意WM_WTSSESSION_CHANGE,尤其是WTS_SESSION_LOGOFF.
If you have a window you can register for Terminal Services notifications using WTSRegisterSessionNotification. Then watch for WM_WTSSESSION_CHANGE and specifically for WTS_SESSION_LOGOFF.
这篇关于在Activex项目中检测注销事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文