The reason for changing the service status to SERVICE_CONTROL_STOP. If the current control code is not SERVICE_CONTROL_STOP, this member is ignored.
This member must be set to a combination of one general code, one major reason code, and one minor reason code.
The following are the general reason codes.
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).
An optional string that provides additional information about the service stop. This string is stored in the event log along with the stop reason code. This member must be NULL or a valid string that is less than 128 characters, including the terminating null character.
A pointer to a
SERVICE_STATUS_PROCESS structure that receives the latest service status information. The information returned reflects the most recent status that the service reported to the service control manager.
The service control manager fills in the structure only when
ControlServiceEx returns one of the following error codes: NO_ERROR, ERROR_INVALID_SERVICE_CONTROL, ERROR_SERVICE_CANNOT_ACCEPT_CTRL, or ERROR_SERVICE_NOT_ACTIVE. Otherwise, the structure is not filled in.
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Winsvc.h (include Windows.h)
Unicode and ANSI names
SERVICE_CONTROL_STATUS_REASON_PARAMSW (Unicode) and SERVICE_CONTROL_STATUS_REASON_PARAMSA (ANSI)