I’m trying to read a string from a memory area. I am extremely inexperience with C++ but wrote some software that manages to identify a process and read an integer from memory.
However, I would now like to read a string from memory so I can compare it within my software and perform an action based on it’s value.
I’ve used Cheat Engine to get the correct memory address:
My software is as follows:
DWORD addressOfString = 0xB935F9;
wchar_t JTname[100];
BOOL ret = ReadProcessMemory(phandle, (BYTE*)addressOfString, JTname, sizeof(JTname), 0);
cout << "nString found = n";
std::wcout << JTname << std::endl;
This software is some that I gleaned from internet searches but it doesn’t seem to be working.
Can anyone point out where I’m going wrong?
Thanks