| // Copyright 2012 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| // func servicemain(argc uint32, argv **uint16) |
| TEXT ·servicemain(SB),7,$0 |
| MOVL $·servicectlhandler(SB), AX |
| MOVL ·cRegisterServiceCtrlHandlerExW(SB), AX |
| MOVL ·cWaitForSingleObject(SB), AX |
| // I do not know why, but this seems to be the only way to call |
| // ctlHandlerProc on Windows 7. |
| // func servicectlhandler(ctl uint32, evtype uint32, evdata uintptr, context uintptr) uintptr { |
| TEXT ·servicectlhandler(SB),7,$0 |
| MOVL ·ctlHandlerExProc(SB), CX |