What does Windows error code 1052 (ERROR_INVALID_SERVICE_CONTROL) mean?

 
Previous Next
ERROR_DEPENDENT_SERVICES_RUNNING ERROR_SERVICE_REQUEST_TIMEOUT

ERROR_INVALID_SERVICE_CONTROL

The service does not accept the requested control

A service reports the controls it accepts through SERVICE_STATUS, while the control handler processes the corresponding requests sent by the SCM. All services must support interrogation, but stop, pause/continue, shutdown, and other controls depend on the service contract and current state.

Before sending a control, query service status and inspect dwControlsAccepted. A client should not assume that every running service can pause or stop. Custom control codes also require SERVICE_USER_DEFINED_CONTROL access and a control value in the documented user-defined range. On the service side, update accepted controls when state changes and keep the handler responsive; a control that is valid while running may be inappropriate during START_PENDING or STOP_PENDING.

What to inspect

  • Query SERVICE_STATUS_PROCESS and inspect dwControlsAccepted.
  • Match the control code to the service state and documented handler behavior.
  • For custom controls, verify access rights and the user-defined control range.

References


Looking for a different code? Search another status or error code.