Hi,
i want to read out the server name, when i am on a samp.
This is what i found in CE:
There are so many tutorials out there for reading memory from a window, but not from a .dll.
Also i got a pointer to mange, not that easy for me getting started with c++.
This is what i got in c++:
Thanks in advance for helping me and taking you time!
i want to read out the server name, when i am on a samp.
This is what i found in CE:
There are so many tutorials out there for reading memory from a window, but not from a .dll.
Also i got a pointer to mange, not that easy for me getting started with c++.
This is what i got in c++:
Code:
int main()
{
while (hWnd == 0) {
hWnd = FindWindow(0, L"GTA:SA:MP");
Sleep(100);
}
cout << "The window GTA:SA:MP was found!" << endl;
GetWindowThreadProcessId(hWnd, &pId);
pHandle = OpenProcess(PROCESS_ALL_ACCESS | PROCESS_VM_OPERATION, TRUE, pId);
DWORD ADDR;
const char* ServerString;
DWORD SAMPDLLBASE = GetModuleBaseAddress(L"GTA:SA:MP", L"samp.dll");
ReadProcessMemory(pHandle, (LPVOID)((SAMPDLLBASE + 0x21A0F8) + 121), (LPVOID)&ServerString, sizeof(ServerString), NULL);
cout << ServerString;
std::cin.get();
}
Thanks in advance for helping me and taking you time!