S
StevenBroundic
Guest
where i did error, i can't understand.. :
#include "Utility.h"
MODULEENTRY32 mEntry;
HANDLE hProc;
DWORD pid;
DWORD64 Base;
HWND hwnd;
DWORD64 GetModule(const char* lModule, DWORD dwPID)
{
HANDLE hModule = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwPID);
mEntry.dwSize = sizeof(MODULEENTRY32);
do
{ Error :
if (!strcmp(mEntry.szModule, lModule))
{
CloseHandle(hModule);
return (DWORD_PTR)mEntry.modBaseAddr;
}
} while (Module32Next(hModule, &mEntry));
CloseHandle(hModule);
return 0;
}
DWORD64 GetBase() { Error :
hwnd = FindWindow(NULL, "window"); // Get the Window of the Process
GetWindowThreadProcessId(hwnd, &pid); // Get the Process ID of the Process;
Base = GetModule("window.exe", pid); // Getting the Process Base address using the pid
hProc = OpenProcess(PROCESS_ALL_ACCESS, 0, pid); // Gain full Access on the process.
return Base;
}
THIS IS THE ERRORS, YOU SEE..
ERROR 1 NAME : argument of type "WCHAR" is incompatible with parameter of type "const char*"
ERROR 2 NAME : argument of type "const char*" is incompatible with parameter of type "LPCWSTR"
Continue reading...
#include "Utility.h"
MODULEENTRY32 mEntry;
HANDLE hProc;
DWORD pid;
DWORD64 Base;
HWND hwnd;
DWORD64 GetModule(const char* lModule, DWORD dwPID)
{
HANDLE hModule = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwPID);
mEntry.dwSize = sizeof(MODULEENTRY32);
do
{ Error :
if (!strcmp(mEntry.szModule, lModule))
{
CloseHandle(hModule);
return (DWORD_PTR)mEntry.modBaseAddr;
}
} while (Module32Next(hModule, &mEntry));
CloseHandle(hModule);
return 0;
}
DWORD64 GetBase() { Error :
hwnd = FindWindow(NULL, "window"); // Get the Window of the Process
GetWindowThreadProcessId(hwnd, &pid); // Get the Process ID of the Process;
Base = GetModule("window.exe", pid); // Getting the Process Base address using the pid
hProc = OpenProcess(PROCESS_ALL_ACCESS, 0, pid); // Gain full Access on the process.
return Base;
}
THIS IS THE ERRORS, YOU SEE..
ERROR 1 NAME : argument of type "WCHAR" is incompatible with parameter of type "const char*"
ERROR 2 NAME : argument of type "const char*" is incompatible with parameter of type "LPCWSTR"
Continue reading...