March 30th, 2004, 03:13 PM
How to recognize a STOP in Windows Services
I am writing a Service in 'C' which has lots of database activity. When the user requests to STOP the Service (within the Service Control Manager) the program simply halts. It does not matter what it is in the middle of doing.
How do I recognize that a STOP has been requested? I need this so I can shutdown the service gracefully.
There is a nice example of a Service posted on this web-site and it shows how to pause or stop a service but both of these happen instantly without any warning.
Any help is greatly appreciated!
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!