Board index » Visual Studio » Windows shutdown & program running as service
|
GrahamToal
|
Windows shutdown & program running as service
Visual Studio233
Hello I have made a program that runs as a service. My program does not shut down correctly when windows is restarted or shut down. It seems as if my service handler is never called (only the service main function is called at start up). If I stop the service manually from services.msc (I am using win xp pro) the service handler is called correctly and the programs shuts down correctly. My program has a window that is closed when the users logs off the computer (by overriding CWnd::OnEndSession), but how do I know tell if OnEndSession has been called because the computer is being shutdown or if it has been called because the user is logging off?? cheers Peter - |
