aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/elevate/zsyscall_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'elevate/zsyscall_windows.go')
-rw-r--r--elevate/zsyscall_windows.go14
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)