There are two types of services:
Win32 service
Driver service
A Win32 service runs in a Win32 process which it may or may not share with other Win32 services. It participates as a service managed by the Service Control Manager in the following ways:
1.It is installed in the Service Control Manager database as a Win32 service with these attributes:
Has a binary name with a .EXE extension.
Has a user logon account which is identical to the account of other services it shares the same process with.
Has a dependency list of services and drivers it requires to be started first.
Specifies whether to start automatically at boot, or on demand.
2.It conforms to all the rules of the service control interface. This means that the service must:
Establish a communication link to the Service Control Manager the moment it starts up. This includes providing a control handling routine to field control requests.
Notify the Service Control Manager of its starting status once the communication link to the Service Control Manager is established.
Update the Service Control Manager whenever a change of status occurs.
A Driver service is written to follow the protocols of the NT device driver. It does not support the service control interface required of a Win32 service. It participates as a service managed by the Service Control Manager in the following ways:
1.It is installed in the Service Control Manager database as a Driver service with these attributes:
Has a binary name with a .SYS extension.
Has an NT driver name which the I/O system recognizes, for example \FileSystem\LanmanRedirector or \Driver\Xns.
Has a dependency list of drivers it requires to be started first.
Specifies whether to start automatically at boot, or on demand.
The Service Control Manager maintains the status of a Driver service by querying the I/O system instead of being told of the service status by the service itself as in the case of a Win32 service.
There are some boot-strap device drivers that are started before the Service Control Manager like the disk, screen, keyboard, and comm port drivers. Each of these drivers has an entry in the Service Control Manager database specifying that it is to be auto-started at boot. When the Service Control Manager tries to auto-start such a driver, it will get a return code from the I/O system saying that the driver has started. The service status maintained by the Service Control Manager for that driver is then updated to reflect its running state.