hi, here is my code
Code:
#include <windows.h>
#include <stdio.h>
#define ADDR 0x100AEC4
int main()
{
HWND gHwnd;
DWORD pid;
HANDLE hProcess;
char result;
gHwnd = FindWindow(NULL,"********");
if(!gHwnd)
{MessageBox(0,"******* could not be detected.","Error",0); return 0;}
GetWindowThreadProcessId(gHwnd,&pid);
hProcess = OpenProcess(PROCESS_ALL_ACCESS,true,pid);
if(!hProcess)
{MessageBox(0,"Couldnt get a process handle to SD","Error",0); return 0;}
ReadProcessMemory(hProcess,(void *)ADDR,(void*)&result,4,NULL);
//working on getting msgbox to show actual number, not ascii character of the supposed code
MessageBox(0,(&result),"Warning",MB_OK | MB_ICONWARNING);
return 0;
}
The code works, in that it grabs the value (255) from a memory address, but the messagebox displays it as ÿ, the 255th ascii character i believe.
How can i get it to just display the number?
Thanks in advance