The QUERY_SERVICE_CONFIG structure is used by the QueryServiceConfig function to return configuration information about an installed service.
typedef struct _QUERY_SERVICE_CONFIG { // qsc DWORD dwServiceType; DWORD dwStartType; DWORD dwErrorControl; LPTSTR lpBinaryPathName; LPTSTR lpLoadOrderGroup; DWORD dwTagId; LPTSTR lpDependencies; LPTSTR lpServiceStartName; LPTSTR lpDisplayName; } QUERY_SERVICE_CONFIG, LPQUERY_SERVICE_CONFIG;
Value |
Meaning |
SERVICE_WIN32_OWN_PROCESS |
A service type flag that indicates a Win32 service that runs in its own process. |
SERVICE_WIN32_SHARE_PROCESS |
A service type flag that indicates a Win32 service that shares a process with other services. |
SERVICE_KERNEL_DRIVER |
A service type flag that indicates a Windows NT device driver. |
SERVICE_FILE_SYSTEM_DRIVER |
A service type flag that indicates a Windows NT file system driver. |
SERVICE_INTERACTIVE_PROCESS |
A flag that indicates a Win32 service process that can interact with the desktop. |
Value |
Meaning |
SERVICE_BOOT_START |
Specifies a device driver started by the operating system loader. This value is valid only if the service type is SERVICE_KERNEL_DRIVER or SERVICE_FILE_SYSTEM_DRIVER. |
SERVICE_SYSTEM_START |
Specifies a device driver started by the IoInitSystem function. This value is valid only if the service type is SERVICE_KERNEL_DRIVER or SERVICE_FILE_SYSTEM_DRIVER. |
SERVICE_AUTO_START |
Specifies a device driver or Win32 service started by the service control manager automatically during system startup. |
SERVICE_DEMAND_START |
Specifies a device driver or Win32 service started by the service control manager when a process calls the StartService function. |
SERVICE_DISABLED |
Specifies a device driver or Win32 service that can no longer be started. |
Value |
Meaning |
SERVICE_ERROR_IGNORE | |
The startup (boot) program logs the error but continues the startup operation. | |
SERVICE_ERROR_NORMAL | |
The startup program logs the error and displays a message box pop-up but continues the startup operation. | |
SERVICE_ERROR_SEVERE | |
The startup program logs the error. If the last-known good configuration is being started, the startup operation continues. Otherwise, the system is restarted with the last-known-good configuration. | |
SERVICE_ERROR_CRITICAL | |
The startup program logs the error, if possible. If the last-known good configuration is being started, the startup operation fails. Otherwise, the system is restarted with the last-known good configuration. |
HKEY_LOCAL_MACHINE\System
\CurrentControlSet\Control\ServiceGroupOrder.
The startup program uses this list to load groups of services in a specified order with respect to the other groups in the list. You can place a service in a group so that another service can depend on the group.
The order in which a service starts is determined by the following criteria:
HKEY_LOCAL_MACHINE\System\CurrentControlSet
\Control\GroupOrderList
Tags are only evaluated for SERVICE_KERNEL_DRIVER and
SERVICE_FILE_SYSTEM_DRIVER type services that have SERVICE_BOOT_START or
SERVICE_SYSTEM_START start types.
If the service type is SERVICE_KERNEL_DRIVER or SERVICE_FILE_SYSTEM_DRIVER,
this name is the Windows NT driver object name (that is, \FileSystem\Rdr or
\Driver\Xns) which the input and output (I/O) system uses to load the device
driver. If NULL is specified, the driver is run with a default object name
created by the I/O system based on the service name.
The configuration information for a service is initially specified when the service is created by a call to the CreateService function. The information can be modified by calling the ChangeServiceConfig function.
ChangeServiceConfig, CreateService, QueryServiceConfig, StartService