diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-13 11:32:51 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-05-13 14:21:38 +0200 |
commit | 8adbb0d5125a13121257d545bc5def0b3b17b488 (patch) | |
tree | b5e24df4ae181df9912fa7a0f77c176fff4b4a3f /service/zsyscall_windows.go | |
parent | ui: show taskbar progress (diff) | |
download | wireguard-windows-8adbb0d5125a13121257d545bc5def0b3b17b488.tar.xz wireguard-windows-8adbb0d5125a13121257d545bc5def0b3b17b488.zip |
service: use more standard naming scheme for syscalls
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'service/zsyscall_windows.go')
-rw-r--r-- | service/zsyscall_windows.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/service/zsyscall_windows.go b/service/zsyscall_windows.go index bb8d89d4..cc40ddea 100644 --- a/service/zsyscall_windows.go +++ b/service/zsyscall_windows.go @@ -60,7 +60,7 @@ func wtsQueryUserToken(session uint32, token *windows.Token) (err error) { return } -func wtsEnumerateSessions(handle windows.Handle, reserved uint32, version uint32, sessions **wtsSessionInfo, count *uint32) (err error) { +func wtsEnumerateSessions(handle windows.Handle, reserved uint32, version uint32, sessions **WTS_SESSION_INFO, count *uint32) (err error) { r1, _, e1 := syscall.Syscall6(procWTSEnumerateSessionsW.Addr(), 5, uintptr(handle), uintptr(reserved), uintptr(version), uintptr(unsafe.Pointer(sessions)), uintptr(unsafe.Pointer(count)), 0) if r1 == 0 { if e1 != 0 { @@ -77,9 +77,11 @@ func wtsFreeMemory(ptr uintptr) { return } -func notifyServiceStatusChange(service windows.Handle, notifyMask uint32, notifyBuffer uintptr) (status uint32) { - r0, _, _ := syscall.Syscall(procNotifyServiceStatusChangeW.Addr(), 3, uintptr(service), uintptr(notifyMask), uintptr(notifyBuffer)) - status = uint32(r0) +func notifyServiceStatusChange(service windows.Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) { + r0, _, _ := syscall.Syscall(procNotifyServiceStatusChangeW.Addr(), 3, uintptr(service), uintptr(notifyMask), uintptr(unsafe.Pointer(notifier))) + if r0 != 0 { + ret = syscall.Errno(r0) + } return } |