Hello
I'm new on AutoIt and I would like find the base address of process. I have find in the multiple forum the same script to find this address, il EXACTLY that I search, but it don't work. :/
This is my script and the return is always 0. I don't understand why it don't work, I have make an error?
Thank in advance
I'm new on AutoIt and I would like find the base address of process. I have find in the multiple forum the same script to find this address, il EXACTLY that I search, but it don't work. :/
This is my script and the return is always 0. I don't understand why it don't work, I have make an error?
Func GetWoWBaseAddress($PID) $HSNAP = DllCall("Kernel32.dll", "HANDLE", "CreateToolhelp32Snapshot", "DWORD", 8, "DWORD", $PID) $STMODULE = DllStructCreate("DWORD dwSize;DWORD th32ModuleID;DWORD th32ProcessID;" & "DWORD GlblcntUsage;DWORD ProccntUsage;ptr modBaseAddr;" & "DWORD modBaseSize;HANDLE hModule;WCHAR szModule[256];" & "WCHAR szExePath[260]") DllStructSetData($STMODULE, "dwSize", DllStructGetSize($STMODULE)) $RET = DllCall("Kernel32.dll", "BOOLEAN", "Module32FirstW", "HANDLE", $HSNAP[0], "ptr", DllStructGetPtr($STMODULE)) IF ($RET[0] = False) Then DllCall("Kernel32.dll", "BOOLEAN", "CloseHandle", "HANDLE", $HSNAP[0]) Return 0 Else $RET[0] = True Do If DllStructGetData($STMODULE, "szModule") = "Wow.exe" Then DllCall("Kernel32.dll", "BOOLEAN", "CloseHandle", "HANDLE", $HSNAP[0]) Return DllStructGetData($STMODULE, "modBaseAddr") EndIf $RET = DllCall("Kernel32.dll", "BOOLEAN", "Module32NextW", "HANDLE", $HSNAP[0], "ptr", DllStructGetPtr($STMODULE)) Until $RET[0] = False EndIf EndFunc $PID = WinGetProcess("World of Warcraft") $WowBase = GetWoWBaseAddress($PID) MsgBox(0,"Titre",$WowBase)
Thank in advance