aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--conf/dnsresolver_windows.go4
-rw-r--r--conf/dpapi/dpapi_windows.go4
-rw-r--r--conf/path_windows.go4
-rw-r--r--conf/storewatcher_windows.go4
-rw-r--r--main.go6
-rw-r--r--service/securityapi.go6
-rw-r--r--service/tunneltracker.go4
-rw-r--r--version/os_windows.go2
-rw-r--r--version/version_windows.go6
-rw-r--r--version/wintrust/certificate_windows.go2
-rw-r--r--version/wintrust/wintrust_windows.go2
11 files changed, 22 insertions, 22 deletions
diff --git a/conf/dnsresolver_windows.go b/conf/dnsresolver_windows.go
index 165baf3e..3157a878 100644
--- a/conf/dnsresolver_windows.go
+++ b/conf/dnsresolver_windows.go
@@ -16,8 +16,8 @@ import (
"golang.org/x/sys/windows"
)
-//sys internetGetConnectedState(flags *uint32, reserved uint32) (connected bool) = wininet.InternetGetConnectedState
-//sys getTickCount64() (ms uint64) = kernel32.GetTickCount64
+//sys internetGetConnectedState(flags *uint32, reserved uint32) (connected bool) = wininet.InternetGetConnectedState
+//sys getTickCount64() (ms uint64) = kernel32.GetTickCount64
func resolveHostname(name string) (resolvedIpString string, err error) {
const maxTries = 10
diff --git a/conf/dpapi/dpapi_windows.go b/conf/dpapi/dpapi_windows.go
index 05074717..851ec1ee 100644
--- a/conf/dpapi/dpapi_windows.go
+++ b/conf/dpapi/dpapi_windows.go
@@ -37,7 +37,7 @@ func bytesToBlob(bytes []byte) *dpBlob {
return blob
}
-//sys cryptProtectData(dataIn *dpBlob, name *uint16, optionalEntropy *dpBlob, reserved uintptr, promptStruct uintptr, flags uint32, dataOut *dpBlob) (err error) = crypt32.CryptProtectData
+//sys cryptProtectData(dataIn *dpBlob, name *uint16, optionalEntropy *dpBlob, reserved uintptr, promptStruct uintptr, flags uint32, dataOut *dpBlob) (err error) = crypt32.CryptProtectData
func Encrypt(data []byte, name string) ([]byte, error) {
out := dpBlob{}
@@ -58,7 +58,7 @@ func Encrypt(data []byte, name string) ([]byte, error) {
return ret, nil
}
-//sys cryptUnprotectData(dataIn *dpBlob, name **uint16, optionalEntropy *dpBlob, reserved uintptr, promptStruct uintptr, flags uint32, dataOut *dpBlob) (err error) = crypt32.CryptUnprotectData
+//sys cryptUnprotectData(dataIn *dpBlob, name **uint16, optionalEntropy *dpBlob, reserved uintptr, promptStruct uintptr, flags uint32, dataOut *dpBlob) (err error) = crypt32.CryptUnprotectData
func Decrypt(data []byte, name string) ([]byte, error) {
out := dpBlob{}
diff --git a/conf/path_windows.go b/conf/path_windows.go
index 1345db14..34e189b2 100644
--- a/conf/path_windows.go
+++ b/conf/path_windows.go
@@ -14,8 +14,8 @@ import (
"golang.org/x/sys/windows"
)
-//sys coTaskMemFree(pointer uintptr) = ole32.CoTaskMemFree
-//sys shGetKnownFolderPath(id *windows.GUID, flags uint32, token windows.Handle, path **uint16) (err error) [failretval!=0] = shell32.SHGetKnownFolderPath
+//sys coTaskMemFree(pointer uintptr) = ole32.CoTaskMemFree
+//sys shGetKnownFolderPath(id *windows.GUID, flags uint32, token windows.Handle, path **uint16) (err error) [failretval!=0] = shell32.SHGetKnownFolderPath
var folderIDLocalAppData = windows.GUID{0xf1b32785, 0x6fba, 0x4fcf, [8]byte{0x9d, 0x55, 0x7b, 0x8e, 0x7f, 0x15, 0x70, 0x91}}
const kfFlagCreate = 0x00008000
diff --git a/conf/storewatcher_windows.go b/conf/storewatcher_windows.go
index 26e94cd2..f5cbb553 100644
--- a/conf/storewatcher_windows.go
+++ b/conf/storewatcher_windows.go
@@ -22,8 +22,8 @@ const (
fncSECURITY uint32 = 0x00000100
)
-//sys findFirstChangeNotification(path *uint16, watchSubtree bool, filter uint32) (handle windows.Handle, err error) = kernel32.FindFirstChangeNotificationW
-//sys findNextChangeNotification(handle windows.Handle) (err error) = kernel32.FindNextChangeNotification
+//sys findFirstChangeNotification(path *uint16, watchSubtree bool, filter uint32) (handle windows.Handle, err error) = kernel32.FindFirstChangeNotificationW
+//sys findNextChangeNotification(handle windows.Handle) (err error) = kernel32.FindNextChangeNotification
var haveStartedWatchingConfigDir bool
diff --git a/main.go b/main.go
index 7780354a..c0dc5c49 100644
--- a/main.go
+++ b/main.go
@@ -32,8 +32,8 @@ var flags = [...]string{
"/dumplog OUTPUT_PATH",
}
-//sys messageBoxEx(hwnd windows.Handle, text *uint16, title *uint16, typ uint, languageId uint16) = user32.MessageBoxExW
-//sys isWow64Process(handle windows.Handle, isWow64 *bool) (err error) = kernel32.IsWow64Process
+//sys messageBoxEx(hwnd windows.Handle, text *uint16, title *uint16, typ uint, languageId uint16) = user32.MessageBoxExW
+//sys isWow64Process(handle windows.Handle, isWow64 *bool) (err error) = kernel32.IsWow64Process
func fatal(v ...interface{}) {
messageBoxEx(0, windows.StringToUTF16Ptr(fmt.Sprint(v...)), windows.StringToUTF16Ptr("Error"), 0x00000010, 0)
@@ -90,7 +90,7 @@ func checkForAdminGroup() {
}
}
-//sys shellExecute(hwnd windows.Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int) (err error) = shell32.ShellExecuteW
+//sys shellExecute(hwnd windows.Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int) (err error) = shell32.ShellExecuteW
func execElevatedManagerServiceInstaller() error {
path, err := os.Executable()
if err != nil {
diff --git a/service/securityapi.go b/service/securityapi.go
index b7171198..497f43ce 100644
--- a/service/securityapi.go
+++ b/service/securityapi.go
@@ -51,9 +51,9 @@ type WTS_SESSION_INFO struct {
State uint32
}
-//sys wtsQueryUserToken(session uint32, token *windows.Token) (err error) = wtsapi32.WTSQueryUserToken
-//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
+//sys wtsQueryUserToken(session uint32, token *windows.Token) (err error) = wtsapi32.WTSQueryUserToken
+//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 (
SE_GROUP_ENABLED = 0x00000004
diff --git a/service/tunneltracker.go b/service/tunneltracker.go
index e0f5414a..313be830 100644
--- a/service/tunneltracker.go
+++ b/service/tunneltracker.go
@@ -19,8 +19,8 @@ import (
"golang.zx2c4.com/wireguard/windows/conf"
)
-//sys notifyServiceStatusChange(service windows.Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) = advapi32.NotifyServiceStatusChangeW
-//sys sleepEx(milliseconds uint32, alertable bool) (ret uint32) = kernel32.SleepEx
+//sys notifyServiceStatusChange(service windows.Handle, notifyMask uint32, notifier *SERVICE_NOTIFY) (ret error) = advapi32.NotifyServiceStatusChangeW
+//sys sleepEx(milliseconds uint32, alertable bool) (ret uint32) = kernel32.SleepEx
const (
SERVICE_NOTIFY_STATUS_CHANGE = 2
diff --git a/version/os_windows.go b/version/os_windows.go
index 27c64dc1..2f5e8d44 100644
--- a/version/os_windows.go
+++ b/version/os_windows.go
@@ -181,7 +181,7 @@ type OsVersionInfo struct {
_ byte
}
-//sys rtlGetVersion(versionInfo *OsVersionInfo) (err error) [failretval!=0] = ntdll.RtlGetVersion
+//sys rtlGetVersion(versionInfo *OsVersionInfo) (err error) [failretval!=0] = ntdll.RtlGetVersion
func OsVersion() (versionInfo OsVersionInfo, err error) {
versionInfo.osVersionInfoSize = uint32(unsafe.Sizeof(versionInfo))
diff --git a/version/version_windows.go b/version/version_windows.go
index 9a2c810d..b8775b7d 100644
--- a/version/version_windows.go
+++ b/version/version_windows.go
@@ -16,9 +16,9 @@ import (
"golang.org/x/sys/windows"
)
-//sys GetFileVersionInfoSize(filename *uint16, zero *uint32) (size uint32, err error) = version.GetFileVersionInfoSizeW
-//sys GetFileVersionInfo(filename *uint16, zero uint32, size uint32, block *byte) (err error) = version.GetFileVersionInfoW
-//sys VerQueryValue(block *byte, section *uint16, value **byte, size *uint32) (err error) = version.VerQueryValueW
+//sys GetFileVersionInfoSize(filename *uint16, zero *uint32) (size uint32, err error) = version.GetFileVersionInfoSizeW
+//sys GetFileVersionInfo(filename *uint16, zero uint32, size uint32, block *byte) (err error) = version.GetFileVersionInfoW
+//sys VerQueryValue(block *byte, section *uint16, value **byte, size *uint32) (err error) = version.VerQueryValueW
type vsFixedFileInfo struct {
Signature uint32
diff --git a/version/wintrust/certificate_windows.go b/version/wintrust/certificate_windows.go
index ab7c10d6..cf254e4f 100644
--- a/version/wintrust/certificate_windows.go
+++ b/version/wintrust/certificate_windows.go
@@ -19,7 +19,7 @@ const (
CERT_QUERY_FORMAT_FLAG_ALL = 14
)
-//sys CryptQueryObject(objectType uint32, object uintptr, expectedContentTypeFlags uint32, expectedFormatTypeFlags uint32, flags uint32, msgAndCertEncodingType *uint32, contentType *uint32, formatType *uint32, certStore *windows.Handle, msg *windows.Handle, context *uintptr) (err error) = crypt32.CryptQueryObject
+//sys CryptQueryObject(objectType uint32, object uintptr, expectedContentTypeFlags uint32, expectedFormatTypeFlags uint32, flags uint32, msgAndCertEncodingType *uint32, contentType *uint32, formatType *uint32, certStore *windows.Handle, msg *windows.Handle, context *uintptr) (err error) = crypt32.CryptQueryObject
func ExtractCertificates(path string) ([]x509.Certificate, error) {
path16, err := windows.UTF16PtrFromString(path)
diff --git a/version/wintrust/wintrust_windows.go b/version/wintrust/wintrust_windows.go
index abb413b9..fa3b2f0b 100644
--- a/version/wintrust/wintrust_windows.go
+++ b/version/wintrust/wintrust_windows.go
@@ -113,4 +113,4 @@ type CertStrongSignPara struct {
InfoOrSerializedInfoOrOID uintptr
}
-//sys WinVerifyTrust(hWnd windows.Handle, actionId *windows.GUID, data *WinTrustData) (err error) [r1 != 0] = wintrust.WinVerifyTrust
+//sys WinVerifyTrust(hWnd windows.Handle, actionId *windows.GUID, data *WinTrustData) (err error) [r1 != 0] = wintrust.WinVerifyTrust