What Is the Life of an NT Service Like


  1. The SCM handles creates a unique logon session for the service (including a window station, a desktop, and an access token)
  2. main() or WinMain() starts the service control dispatcher
  3. Service control dispatcher does two things
    1. Creates a thread and calls ServiceMain()
    2. Sends messages to message handler (after ServiceMain() registers it)
  4. ServiceMain() gets called by the SCM
    1. Registers the control handler
    2. Sends starting status to the SCM
    3. Digests any parameters that got passed by the controller
    4. Initializes resources, gets ready to go
    5. Tells the SCM that it is running
    6. Does whatever work it's supposed to do
    7. Waits for a stop signal from the control handler
    8. Cleans up resources and terminates
  5. The handler function handles messages from the SCM

Back to the main Services T3 Page
Back (Why Are There No Services Under Win95/98?) Next (Security and NT Services)

This page is maintained by Peyton Engel.
Last modified 24 May 1999