2.2.30 SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA

The SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA structure<8> contains the reason associated with the SERVICE_CONTROL_STOP control. String values are in ANSI.

 typedef struct _SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA {
   DWORD dwReason;
   [string, range(0, SC_MAX_COMMENT_LENGTH)] 
     LPSTR pszComment;
 } SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA,
  *PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSA;

dwReason: The reason associated with the SERVICE_CONTROL_STOP control. This member MUST be set to a combination of one general reason code, one major reason code, and one minor reason code.

The following are the general reason codes.

Value

Meaning

SERVICE_STOP_CUSTOM

 0x20000000

The reason code is defined by the user. If this flag is not present, the reason code is defined by the system. If this flag is specified with a system reason code, the function call fails.

Users can create custom major reason codes in the range SERVICE_STOP_REASON_MAJOR_MIN_CUSTOM (0x00400000) through SERVICE_STOP_REASON_MAJOR_MAX_CUSTOM (0x00ff0000) and minor reason codes in the range SERVICE_STOP_REASON_MINOR_MIN_CUSTOM (0x00000100) through SERVICE_STOP_REASON_MINOR_MAX_CUSTOM (0x0000FFFF).

SERVICE_STOP_PLANNED

 0x40000000

The service stop was planned.

SERVICE_STOP_UNPLANNED

 0x10000000

The service stop was not planned.

The following are the major reason codes.

Value

Meaning

SERVICE_STOP_REASON_MAJOR_APPLICATION

0x00050000

Application issue

SERVICE_STOP_REASON_MAJOR_HARDWARE

0x00020000

Hardware issue

SERVICE_STOP_REASON_MAJOR_NONE

0x00060000

No major reason

SERVICE_STOP_REASON_MAJOR_OPERATINGSYSTEM

0x00030000

Operating system issue

SERVICE_STOP_REASON_MAJOR_OTHER

0x00010000

Other issue

SERVICE_STOP_REASON_MAJOR_SOFTWARE

0x00040000

Software issue

The following are the minor reason codes.

Value

Meaning

SERVICE_STOP_REASON_MINOR_DISK

0x00000008

Disk

SERVICE_STOP_REASON_MINOR_ENVIRONMENT

0x0000000a

Environment

SERVICE_STOP_REASON_MINOR_HARDWARE_DRIVER

0x0000000b

Driver

SERVICE_STOP_REASON_MINOR_HUNG

0x00000006

Unresponsive

SERVICE_STOP_REASON_MINOR_INSTALLATION

0x00000003

Installation

SERVICE_STOP_REASON_MINOR_MAINTENANCE

0x00000002

Maintenance

SERVICE_STOP_REASON_MINOR_MMC

0x00000016

MMC issue

SERVICE_STOP_REASON_MINOR_NETWORK_CONNECTIVITY

0x00000011

Network connectivity

SERVICE_STOP_REASON_MINOR_NETWORKCARD

0x00000009

Network card

SERVICE_STOP_REASON_MINOR_NONE

0x00000017

No minor reason

SERVICE_STOP_REASON_MINOR_OTHER

0x00000001

Other issue

SERVICE_STOP_REASON_MINOR_OTHERDRIVER

0x0000000c

Other driver event

SERVICE_STOP_REASON_MINOR_RECONFIG

0x00000005

Reconfigure

SERVICE_STOP_REASON_MINOR_SECURITY

0x00000010

Security issue

SERVICE_STOP_REASON_MINOR_SECURITYFIX

0x0000000f

Security update

SERVICE_STOP_REASON_MINOR_SECURITYFIX_UNINSTALL

0x00000015

Security update uninstall

SERVICE_STOP_REASON_MINOR_SERVICEPACK

0x0000000d

Service pack

SERVICE_STOP_REASON_MINOR_SERVICEPACK_UNINSTALL

0x00000013

Service pack uninstall

SERVICE_STOP_REASON_MINOR_SOFTWARE_UPDATE

0x0000000e

Software update

SERVICE_STOP_REASON_MINOR_SOFTWARE_UPDATE_UNINSTALL

0x00000014

Software update uninstall

SERVICE_STOP_REASON_MINOR_UNSTABLE

0x00000007

Unstable

SERVICE_STOP_REASON_MINOR_UPGRADE

0x00000004

Installation of software

SERVICE_STOP_REASON_MINOR_WMI

0x00000012

WMI issue

pszComment: A pointer to a string that specifies a comment associated with the dwReason parameter. String values are in ANSI.