aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/elevate/shellexecute.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-03-03 14:28:14 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-03-05 16:05:13 -0700
commitf5d29ecf7e1a959859e0e139ca28371e9af6041b (patch)
treeca180f1ed4d7179fcd1cd271429510cb2c78035f /elevate/shellexecute.go
parentconf: merge {Pre,Post}{Up,Down} from uapi (diff)
downloadwireguard-windows-f5d29ecf7e1a959859e0e139ca28371e9af6041b.tar.xz
wireguard-windows-f5d29ecf7e1a959859e0e139ca28371e9af6041b.zip
elevate: use ntdll functions from x/sys
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'elevate/shellexecute.go')
-rw-r--r--elevate/shellexecute.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/elevate/shellexecute.go b/elevate/shellexecute.go
index 81584f26..b681a8a7 100644
--- a/elevate/shellexecute.go
+++ b/elevate/shellexecute.go
@@ -107,9 +107,9 @@ func ShellExecute(program string, arguments string, directory string, show int32
}
originalPath := dataTableEntry.FullDllName.Buffer
explorerPath := windows.StringToUTF16Ptr(filepath.Join(windowsDirectory, "explorer.exe"))
- rtlInitUnicodeString(&dataTableEntry.FullDllName, explorerPath)
+ windows.RtlInitUnicodeString(&dataTableEntry.FullDllName, explorerPath)
defer func() {
- rtlInitUnicodeString(&dataTableEntry.FullDllName, originalPath)
+ windows.RtlInitUnicodeString(&dataTableEntry.FullDllName, originalPath)
runtime.KeepAlive(explorerPath)
}()