capture "End Process" event
-
hi, i have a critical application that i need to capture the event if it is being killed by user in taskmgr.exe or being killed by scheduler. i just want to write the event to a log file. how can i capture this event? any good way to do that? thanks, jim
-
hi, i have a critical application that i need to capture the event if it is being killed by user in taskmgr.exe or being killed by scheduler. i just want to write the event to a log file. how can i capture this event? any good way to do that? thanks, jim
hi Jim - my internet is really slow, I missed your posting, so I have just posted a similar question! I am trying to log some information when my program exits, which works fine with a normal exit, but I can't get it to work when the user shuts down Windows. Even Notepad knows when Windows shuts down, and asks about saving unsaved work, so it must be possible! I'll let you know if I solve the problem!
-
hi Jim - my internet is really slow, I missed your posting, so I have just posted a similar question! I am trying to log some information when my program exits, which works fine with a normal exit, but I can't get it to work when the user shuts down Windows. Even Notepad knows when Windows shuts down, and asks about saving unsaved work, so it must be possible! I'll let you know if I solve the problem!
See these messages: WM_QUERYENDSESSION WM_POWERBROADCAST WM_POWER WM_ENDSESSION Some others to consider regarding changes to system state: For Terminal Services: WTSRegisterSessionNotification If you have open files: WM_DEVICECHANGE If program is dependent upon screen resolution: WM_DISPLAYCHANGE System settings have been modiifed: WM_SETTINGCHANGE WM_WININICHANGE
-
See these messages: WM_QUERYENDSESSION WM_POWERBROADCAST WM_POWER WM_ENDSESSION Some others to consider regarding changes to system state: For Terminal Services: WTSRegisterSessionNotification If you have open files: WM_DEVICECHANGE If program is dependent upon screen resolution: WM_DISPLAYCHANGE System settings have been modiifed: WM_SETTINGCHANGE WM_WININICHANGE