reportbrazil
Technical User
Hi folks, I need to execute a command from my program as soon as the user selects START>SHUTDOWN (the default windows NT shutdown).
So far I have a C++ program that run as an NT4 service and from the Services Control-Pannel I can start, stop and recicle my program/service and it works fine!
When I try to shutdown from START>SHUTDOWN my program just get killed withouth the chance to gracefully shutdown and close all files and terminate procedures I have.
Does anybody know how to intercept the NT4 SHUTDOWN procedure and terminate the program propperly?
Thanks for any comments.
Regards,
Marcelo.
So far I have a C++ program that run as an NT4 service and from the Services Control-Pannel I can start, stop and recicle my program/service and it works fine!
When I try to shutdown from START>SHUTDOWN my program just get killed withouth the chance to gracefully shutdown and close all files and terminate procedures I have.
Does anybody know how to intercept the NT4 SHUTDOWN procedure and terminate the program propperly?
Thanks for any comments.
Regards,
Marcelo.