Service Programs

A service program contains executable code for one or more services. A service created with the type SERVICE_WIN32_OWN_PROCESS only contains the code for one service. The service can be configured to execute in the context of a user account from either the built-in (local), primary, or trusted domain. A service created with the type SERVICE_WIN32_SHARE_PROCESS contains code for more than one service. The services must all execute in the context of the LocalSystem account. For more information, see CreateService.

The following sections describe the interface requirements of the SCM that a service program must include. These sections do not apply to driver services.

·The main Function

·The ServiceMain Function

·The Control Handler Function