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/securityapi.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 '')
-rw-r--r-- | service/securityapi.go | 51 |
1 files changed, 29 insertions, 22 deletions
diff --git a/service/securityapi.go b/service/securityapi.go index d89d9404..2c1db5db 100644 --- a/service/securityapi.go +++ b/service/securityapi.go @@ -13,38 +13,45 @@ import ( ) const ( - wtsSessionLogon uint32 = 5 - wtsSessionLogoff uint32 = 6 + WTS_CONSOLE_CONNECT = 0x1 + WTS_CONSOLE_DISCONNECT = 0x2 + WTS_REMOTE_CONNECT = 0x3 + WTS_REMOTE_DISCONNECT = 0x4 + WTS_SESSION_LOGON = 0x5 + WTS_SESSION_LOGOFF = 0x6 + WTS_SESSION_LOCK = 0x7 + WTS_SESSION_UNLOCK = 0x8 + WTS_SESSION_REMOTE_CONTROL = 0x9 + WTS_SESSION_CREATE = 0xa + WTS_SESSION_TERMINATE = 0xb ) -type wtsState int - const ( - wtsActive wtsState = iota - wtsConnected - wtsConnectQuery - wtsShadow - wtsDisconnected - wtsIdle - wtsListen - wtsReset - wtsDown - wtsInit + WTSActive = 0 + WTSConnected = 1 + WTSConnectQuery = 2 + WTSShadow = 3 + WTSDisconnected = 4 + WTSIdle = 5 + WTSListen = 6 + WTSReset = 7 + WTSDown = 8 + WTSInit = 9 ) -type wtsSessionNotification struct { - size uint32 - sessionID uint32 +type WTS_SESSION_NOTIFICATION struct { + Size uint32 + SessionID uint32 } -type wtsSessionInfo struct { - sessionID uint32 - windowStationName *uint16 - state wtsState +type WTS_SESSION_INFO struct { + SessionID uint32 + WindowStationName *uint16 + State uint32 } //sys wtsQueryUserToken(session uint32, token *windows.Token) (err error) = wtsapi32.WTSQueryUserToken -//sys wtsEnumerateSessions(handle windows.Handle, reserved uint32, version uint32, sessions **wtsSessionInfo, count *uint32) (err error) = wtsapi32.WTSEnumerateSessionsW +//sys wtsEnumerateSessions(handle windows.Handle, reserved uint32, version uint32, sessions **WTS_SESSION_INFO, count *uint32) (err error) = wtsapi32.WTSEnumerateSessionsW //sys wtsFreeMemory(ptr uintptr) = wtsapi32.WTSFreeMemory const ( |