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 WMI issue
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 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
argc: The number of argument strings in the argv array. If argv is NULL, this parameter MAY be zero. argv: A pointer to a buffer that contains an array of pointers to null-terminated ANSI strings that are passed as arguments to the service. Return Values: The method returns 0x00000000 (ERROR_SUCCESS) on success; otherwise, it returns one of the following codes.<46> Return Description 2 ERROR_FILE_NOT_FOUND The system cannot find the file specified. 3 ERROR_PATH_NOT_FOUND The system cannot find the path specified. 5 ERROR_ACCESS_DENIED The SERVICE_START access right had not been granted to the caller when the RPC context handle to the service was created. 6 ERROR_INVALID_HANDLE The handle is no longer valid. 87 ERROR_INVALID_PARAMETER A parameter that was specified is invalid. 1053 ERROR_SERVICE_REQUEST_TIMEOUT The process for the service was started, but it did not respond within an implementation-specific time-out.<47> 1054 ERROR_SERVICE_NO_THREAD A thread could not be created for the service. 1055 ERROR_SERVICE_DATABASE_LOCKED The service database is locked by the call to the method.<48> 1056 ERROR_SERVICE_ALREADY_RUNNING The ServiceStatus.dwCurrentState in the service record is not set to SERVICE_STOPPED. 1058 ERROR_SERVICE_DISABLED The service cannot be started because the field in the service record is set to SERVICE_DISABLED. 1068 ERROR_SERVICE_DEPENDENCY_FAIL The specified service depends on another service that has failed to start. 1069 ERROR_SERVICE_LOGON_FAILED The service did not start due to a logon failure. 1072 ERROR_SERVICE_MARKED_FOR_DELETE The RDeleteService method has been called for the service record identified by the hService parameter. 1075 ERROR_SERVICE_DEPENDENCY_DELETED The specified service depends on a service that does not or has been marked for deletion. 1115 ERROR_SHUTDOWN_IN_PROGRESS The system is shutting down. In response to this request from the client, for a successful operation the server MUST start the service using the information from the service record identified by the hService parameter and pass the arguments specified in the argv parameter as part of the service launch command.
SERVICE_ACCEPT_NETBINDCHANGE bit set in the ServiceStatus.dwControlsAccepted field of the service record. Services can define their own codes in the range 128-255. dwInfoLevel: The information level for the service control parameters. This MUST be set to 0x00000001. pControlInParams: A pointer to a structure that contains the reason associated with the SERVICE_CONTROL_STOP control. pControlOutParams: A pointer to a buffer that contains a structure to receive the current status on the service. Return Values: The method returns 0x00000000 (ERROR_SUCCESS) on success; otherwise, it returns one of the following error codes. Return value/code Description 5 ERROR_ACCESS_DENIED The required access right had not been granted to the caller when the RPC context handle to the service record was created. 6 ERROR_INVALID_HANDLE The handle is no longer valid. 87 ERROR_INVALID_PARAMETER The requested control code is undefined. 124 ERROR_INVALID_LEVEL The dwInfoLevel parameter contains an unsupported value. 1051 ERROR_DEPENDENT_SERVICES_RUNNING The service cannot be stopped because other running services are dependent on it. 1052 ERROR_INVALID_SERVICE_CONTROL The requested control code is not valid, or it is unacceptable to the service. 1053 ERROR_SERVICE_REQUEST_TIMEOUT The process for the service was started, but it did not respond within an implementation-specific time-out.<79> 1061 ERROR_SERVICE_CANNOT_ACCEPT_CTRL The requested control code cannot be sent to the service because the state of the service is SERVICE_START_PENDING or SERVICE_STOP_PENDING. 1062 ERROR_SERVICE_NOT_ACTIVE The service has not been started, or the ServiceStatus.dwCurrentState in the service record is SERVICE_STOPPED. 1115 ERROR_SHUTDOWN_IN_PROGRESS The system is shutting down. In response to this request from the client, for a successful operation the SCM MUST send the control specified in the dwControl parameter to the service created for the service record identified by the hService parameter of the client request if the type of the service record is SERVICE_WIN32_OWN_PROCESS or SERVICE_WIN32_SHARE_PROCESS.
72 131 103 84 104 85 114 116 105 139 86 106 87 67 69 118 68 70 106 88 72 N 10 O 11 P 143 11 11 158 Protocol Details 49 24 26 29 31 35 36 44 46 43 43 43 Q 17 19 21 21 R 112 112 113 113 92 92 73 73 133 133 63 63 63 63 134 134 137 137 95 95 77 77 124 124 128 128 66 66 10 10 10 11 99 99 81 81 110 110 101 101 119 119 121 121 82 82 133 133 108 108 90 90 109 109 91 91 66 66 72 72 131 131 103 103 84 84 104 104 85 85
141 114 114 116 116 105 105 139 139 86 86 106 106 87 87 67 67 69 69 118 118 68 68 70 70 106 106 88 88 72 72 S 22 21 22 47 47 47 47 47 47 47 47 47 22 23 23 24 24 26 Security 143 143 143 58 58 Server 49 58 140 58 112 113 92 73 133 63 63 134 137 95 77 124 128 66 99 81 110 101 119 121 82 133 108 90 109 91 66 72 131 103 84 104 85 114 116 105 139 86 106 87 67 69 118 68 70 106 88 72 58 140 57 13 26 29 31 31 32 32 32 34 32 33 34 35 36 47 37