What's the right way of finding the base address of a process in Java? I know it could be done "easier" in languages like C++ but I'm in need to obtain base address in Java.
Code below is my try but it fails.
String exeName = "Path of Building.exe";
int pid = 0x00000184;
for(Tlhelp32.MODULEENTRY32W m : Kernel32Util.getModules(pid)) {
if(m.szModule().equals(exeName)) {
System.out.println(m.modBaseAddr);
}
}
console output is:native@0x610000
if instead of m.modBaseAddr
would be m.modBaseAddr.getLong(0)
I'm getting Invalid memory access
error
User contributions licensed under CC BY-SA 3.0