GetModuleInformation is a wrapper for the same WIN32 API function https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-getmoduleinformation
(hProcess windows.Handle, hModule syscall.Handle)
| 124 | // GetModuleInformation is a wrapper for the same WIN32 API function |
| 125 | // https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-getmoduleinformation |
| 126 | func GetModuleInformation(hProcess windows.Handle, hModule syscall.Handle) (modInfos ModuleInfo, err error) { |
| 127 | ret, _, err := syscall.Syscall6(procGetModuleInformation.Addr(), 4, uintptr(hProcess), uintptr(hModule), uintptr(unsafe.Pointer(&modInfos)), uintptr(unsafe.Sizeof(modInfos)), 0, 0) |
| 128 | if ret == 0 { |
| 129 | return ModuleInfo{}, err |
| 130 | } |
| 131 | |
| 132 | return modInfos, nil |
| 133 | } |
| 134 | |
| 135 | // ReadProcessMemory is a wrapper for the same WIN32 API function |
| 136 | // https://docs.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-readprocessmemory |