File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,12 @@ func (s *Service) Start(args ...string) error {
45
45
return windows .StartService (s .Handle , uint32 (len (args )), p )
46
46
}
47
47
48
- // Control sends state change request c to the service s.
48
+ // Control sends state change request c to the service s. It returns the most
49
+ // recent status the service reported to the service control manager, and an
50
+ // error if the state change request was not accepted.
51
+ // Note that the service status is only returned if the status change request
52
+ // succeeded, or if it failed with error ERROR_INVALID_SERVICE_CONTROL,
53
+ // ERROR_SERVICE_CANNOT_ACCEPT_CTRL, or ERROR_SERVICE_NOT_ACTIVE.
49
54
func (s * Service ) Control (c svc.Cmd ) (svc.Status , error ) {
50
55
var t windows.SERVICE_STATUS
51
56
err := windows .ControlService (s .Handle , uint32 (c ), & t )
You can’t perform that action at this time.
0 commit comments