Skip to content

Commit

Permalink
Get module of dll now for 64 bit
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoigorr committed Aug 26, 2022
1 parent 190a0f6 commit a94ba7f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion addresses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

void Address::calcAddresses()
{
addr->NextMovement = mem->FindDMAAddyEx(proc->hProcess, addr->unityPlayer, { 0x017AB300 });
addr->NextMovement = addr->unityPlayer + 0x017AB300;
addr->Health = mem->FindDMAAddyEx(proc->hProcess, addr->NextMovement, offset->Health);
}

Expand Down
6 changes: 3 additions & 3 deletions proc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ DWORD_PTR Proc::GetModuleBaseAddress64(DWORD processID)
return baseAddress;
}

DWORD Proc::GetDllModule(const wchar_t* module, DWORD procId)
DWORD_PTR Proc::GetDllModule(const wchar_t* module, DWORD procId)
{
HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, procId);

Expand All @@ -89,12 +89,12 @@ DWORD Proc::GetDllModule(const wchar_t* module, DWORD procId)
}

if (!_wcsicmp(modEntry.szModule, module))
return (DWORD)modEntry.modBaseAddr;
return (DWORD_PTR)modEntry.modBaseAddr;

while (Module32Next(hSnap, &modEntry))
{
if (!_wcsicmp(modEntry.szModule, module))
return (DWORD)modEntry.modBaseAddr;
return (DWORD_PTR)modEntry.modBaseAddr;
}

}
Expand Down
2 changes: 1 addition & 1 deletion proc.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Proc

DWORD GetProcId(const wchar_t* procName);
DWORD_PTR GetModuleBaseAddress64(DWORD processID);
DWORD GetDllModule(const wchar_t* module, DWORD procId);
DWORD_PTR GetDllModule(const wchar_t* module, DWORD procId);

Proc() {
this->hProcess = 0;
Expand Down

0 comments on commit a94ba7f

Please sign in to comment.