diff --git a/windows/svc/service.go b/windows/svc/service.go index d6ec7e78..58ad4efd 100644 --- a/windows/svc/service.go +++ b/windows/svc/service.go @@ -315,8 +315,8 @@ func Run(name string, handler Handler) error { return err } - ctlHandler := func(ctl uint32, evtype uint32, evdata uintptr, context uintptr) uintptr { - e := ctlEvent{cmd: Cmd(ctl), eventType: evtype, eventData: evdata, context: context} + ctlHandler := func(ctl, evtype, evdata, context uintptr) uintptr { + e := ctlEvent{cmd: Cmd(ctl), eventType: uint32(evtype), eventData: evdata, context: context} // We assume that this callback function is running on // the same thread as Run. Nowhere in MS documentation // I could find statement to guarantee that. So putting diff --git a/windows/svc/svc_test.go b/windows/svc/svc_test.go index 8e59c0de..3a80e480 100644 --- a/windows/svc/svc_test.go +++ b/windows/svc/svc_test.go @@ -127,8 +127,7 @@ func TestExample(t *testing.T) { } want := strings.Join(append([]string{name}, args...), "-") // Test context passing (see servicemain in sys_386.s and sys_amd64.s). - // TODO(brainman): Uncomment next line once issue #25660 is fixed. - //want += "-123456" + want += "-123456" if !strings.Contains(string(out), want) { t.Errorf("%q string does not contain %q", string(out), want) }