How do I handle EndProcess events in the Vista Console?

I have a console application. In XP I use SetConsoleCtrlHandler()

a callback for registration, which receives CTRL_LOGOFF_EVENT

, CTRL_C_EVENT

and several others. It works great. When the callback is called, I can clean up before I get back from the call. The problem is that it is SetConsoleCtrlHanlder()

not supported in Vista. Now what?

0


source to share


1 answer


SetConsoleCtrlHandler worked great for me on Vista and there is no indication on the MSDN page that it shouldn't be.



Are you having difficulty getting the same code to work on Vista? If so, what error / error codes do you see?

+1


source







All Articles