Click here to Skip to main content
15,504,830 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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.

Sergey Alexandrovich Kryukov 7-Jun-11 13:09pm    
Not clear what the problem is.
S p k 521 8-Jun-11 2:20am    
How to handle the endsession event in activex control?

1 solution

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.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900