-
March 30th, 2004, 04:13 PM
#1
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!
Mattl
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|