Hello,
I'm looking to get some of my basic C++ questions answered for dealing with World of Warcraft memory reading.
First of I know in 4.0.1 patch you need base address of wow.exe for the offsets to work, but I can't seem to find anything pointing me to something useful that could help me find it.
I started guessing on 0x10000 but that doesn't seem to work and I tried 0x4000000 but doesn't seem to work either. Is this dynamic?
Secondly I want to read the memory from wow, but can't seem to find anything that I can learn from. I've searched the forum for weeks now and tried to get something cooking and did get my program to print the player name (3.3.5a) but nothing fancy.
This is my program at the moment:
Code:
#include <windows.h>
#include <tlhelp32.h>
#include <shlwapi.h>
#include <iostream>
#define PROC_NAME "wow.exe"
HANDLE hProc;
unsigned int baseAddress = 0x10000;
unsigned int PlayerName = baseAddress + 0x008A5C58;
int main() {
// Enable debug privileges
EnablePriv();
hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, getTargetProcessIDFromProcName(PROC_NAME));
if(!hProc) {
std::cout<<"Process could not be found/opened.\n";
std::cin.get();
return 0;
}
char playerName[16] = {'\0'};
ReadProcessMemory(hProc, &PlayerName, &playerName, sizeof(playerName), NULL);
std::cout<<playerName<<std::endl;
std::cin.get();
return 0;
}
Doesn't print anything, the offset is from the thread in this forum, credits to the one who posted it.
Removed EnablePriv and getTargetProcessIDFromProcName to make it more readable.
Thirdly, if anyone could give me a quick example on how to use functions in wow.exe for ex. target function or something cause I got no idea and can't find any informations on how to use them in C++.
Any help or information you could give me is very much appreciated.
I wish NOT to switch to C# and most information I could find was for C#, I've downloaded and looked at tons of sourcecode but didn't help me much.