typedef struct _QUERY_SERVICE_CONFIG {
DWORD dwServiceType;
DWORD dwStartType;
DWORD dwErrorControl;
LPTSTR lpBinaryPathName;
LPTSTR lpLoadOrderGroup;
LPTSTR lpDependencies;
LPTSTR lpServiceStartName;
} QUERY_SERVICE_CONFIG, LPQUERY_SERVICE_CONFIG;
dwServiceType
Value to indicate the type of service this is.
Value | Meaning |
SERVICE_WIN32_OWN_PROCESS | a service which runs in its own Win32 process. |
SERVICE_WIN32_SHARE_PROCESS | a service which shares a Win32 process with other services. |
SERVICE_DRIVER | an NT device driver. |
dwStartType | Value to specify when to start the service. |
Value | Meaning |
SERVICE_BOOT_START | Only valid if service type is SERVICE_DRIVER. This device driver is to be started by the OS loader. |
SERVICE_SYSTEM_START | Only valid if service type is SERVICE_DRIVER. This device driver is to be started by IoInitSystem. |
SERVICE_AUTO_START | Valid for both SERVICE_DRIVER and SERVICE_WIN32 service types. This service is started by the Service Control Manager automatically during boot. |
SERVICE_DEMAND_START | Valid for both SERVICE_DRIVER and SERVICE_WIN32 service types. This service is started by the Service Control Manager when a start request is issued via the StartService API. |
SERVICE_DISABLED | This service can no longer be started. |
dwErrorControl
Value to specify the severity of the error if this service fails to start during boot so that the appropriate action can be taken.
Value | Meaning |
SERVICE_ERROR_NORMAL | Log error but system continues to boot. |
SERVICE_ERROR_SEVERE | Log error, and the system is rebooted with the last-known-good configuration. If the current configuration is last-known-good, press on with boot. |
SERVICE_ERROR_CRITICAL | Log error if possible, and system is rebooted with last-known-good configuration. If the current configuration is last-known-good, boot fails. |
lpBinaryPathName
Fully-qualified path name to the service binary file.
lpLoadOrderGroup
Name of the load ordering group which this service is a member of. Groups of services are started based on the group order list specified in the registry at HKEY_LOCAL_MACHINE\System\ CurrentControlSet\Control\Service_Group_Order (see Boot Configuration Specification for details). The group order takes precedence over the service start dependencies specified in the lpDependencies parameter.
lpDependencies
Space-separated names of services which must be running before this service can run. An empty string means that this service has no dependencies.
lpServiceStartName
If service type is SERVICE_WIN32, this name is the account name in the form of “DomainName\Username” which the service process will be logged on as when it runs. If the account belongs to the built-in domain, “.\Username” can be specified. If service type is SERVICE_DRIVER, this name must be the NT driver object name (e.g. \FileSystem\LanManRedirector or\Driver\Xns) which the I/O system uses to load the device driver.