Hello all,

I have a question that I would like to have answered about NT services. I have already utilized the information from the Win32asm website. Basically I have written an NT service that starts up ok, but has difficulty stopping cleanly i.e. I get error messages.

I understand the concept of notifying the SCM on starting my service, using the start-up API?s. Here?s what I don?t quite understand:

- While my program is running, do I need to continually update my SCM with the running status?

- I have declared a handler function in my program, but I don?t think the SCM calls it correctly or something. When the SCM calls your handler function, does it create a new thread, or stop the execution of your main function to grab focus?

If someone has the time to explain how to handle keeping my service running, and the details of how the SCM works with the handler function, I would greatly appreciate this.

:alright:
Posted on 2002-09-07 22:28:29 by zenwaters