diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-08-05 15:15:15 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-08-05 15:15:15 +0200 |
commit | 9af5e654239ed87f1ec56524083733f333cde2f4 (patch) | |
tree | 906319a4c14749edceff7ba804ed82bc448dd441 /elevate/zsyscall_windows.go | |
parent | go.mod: operate like a normal go module (diff) | |
download | wireguard-windows-jd/fullycooked-peb.tar.xz wireguard-windows-jd/fullycooked-peb.zip |
Fully cooked peb testjd/fullycooked-peb
Diffstat (limited to 'elevate/zsyscall_windows.go')
-rw-r--r-- | elevate/zsyscall_windows.go | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/elevate/zsyscall_windows.go b/elevate/zsyscall_windows.go index a3c5400d..8f7a5a8a 100644 --- a/elevate/zsyscall_windows.go +++ b/elevate/zsyscall_windows.go @@ -41,7 +41,6 @@ var ( modntdll = windows.NewLazySystemDLL("ntdll.dll") modole32 = windows.NewLazySystemDLL("ole32.dll") - procGetModuleHandleW = modkernel32.NewProc("GetModuleHandleW") procGetWindowsDirectoryW = modkernel32.NewProc("GetWindowsDirectoryW") procRtlInitUnicodeString = modntdll.NewProc("RtlInitUnicodeString") procRtlGetCurrentPeb = modntdll.NewProc("RtlGetCurrentPeb") @@ -50,19 +49,6 @@ var ( procCoGetObject = modole32.NewProc("CoGetObject") ) -func getModuleHandle(moduleName *uint16) (moduleHandle uintptr, err error) { - r0, _, e1 := syscall.Syscall(procGetModuleHandleW.Addr(), 1, uintptr(unsafe.Pointer(moduleName)), 0, 0) - moduleHandle = uintptr(r0) - if moduleHandle == 0 { - if e1 != 0 { - err = errnoErr(e1) - } else { - err = syscall.EINVAL - } - } - return -} - func getWindowsDirectory(windowsDirectory *uint16, inLen uint32) (outLen uint32, err error) { r0, _, e1 := syscall.Syscall(procGetWindowsDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(windowsDirectory)), uintptr(inLen), 0) outLen = uint32(r0) |