github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/service/windows/zservice_windows.go (about) 1 // MACHINE GENERATED BY 'go generate' COMMAND; DO NOT EDIT 2 3 package windows 4 5 import "unsafe" 6 import "syscall" 7 import "github.com/gabriel-samfira/sys/windows" 8 9 var _ unsafe.Pointer 10 11 var ( 12 modadvapi32 = syscall.NewLazyDLL("advapi32.dll") 13 14 procEnumServicesStatusExW = modadvapi32.NewProc("EnumServicesStatusExW") 15 ) 16 17 func enumServicesStatus(h windows.Handle, InfoLevel SC_ENUM_TYPE, dwServiceType uint32, dwServiceState uint32, lpServices uintptr, cbBufSize uint32, pcbBytesNeeded *uint32, lpServicesReturned *uint32, lpResumeHandle *uint32, pszGroupName *uint32) (err error) { 18 r1, _, e1 := syscall.Syscall12(procEnumServicesStatusExW.Addr(), 10, uintptr(h), uintptr(InfoLevel), uintptr(dwServiceType), uintptr(dwServiceState), uintptr(lpServices), uintptr(cbBufSize), uintptr(unsafe.Pointer(pcbBytesNeeded)), uintptr(unsafe.Pointer(lpServicesReturned)), uintptr(unsafe.Pointer(lpResumeHandle)), uintptr(unsafe.Pointer(pszGroupName)), 0, 0) 19 if r1 == 0 { 20 if e1 != 0 { 21 err = error(e1) 22 } else { 23 err = syscall.EINVAL 24 } 25 } 26 return 27 }