I've been tryng to learn C++ for a while.. and i'm having trouble... aside from being on Shitty internet... i just dont get it sometimes, and other times... my laptop shoots itself in the foot.
heres my code
Code:
#include <windows.h>
#include <iostream>
using namespace std;
int main()
{
FreeConsole();
HANDLE ProcessHandle;
HWND hWnd;
DWORD PinBallAddress = 0x007ACED2;
DWORD PinBallAddress2 = 0x0007AFA94;
DWORD Id;
int points = 999999;
hWnd = FindWindow(NULL, "3D Pinball for Windows - Space Cadet");
while(!hWnd)
{
MessageBox(NULL, "hold the fuck on", "lookin for pinball", MB_OK);
}
if(!hWind) {
MessageBox(NULL, "hold the fuck on", "lookin for pinball", MB_OK);
}
else
{
MessageBox(NULL, "pinball found", "shit.. it worked", MB_OK);
GetWindowThreadProcessId(hWnd,&Id);
ProcessHandle = OpenProcess(PROCESS_ALL_ACCESS,false,Id);
while(ProcessHandle)
WriteProcessMemory(ProcessHandle, (LPVOID)PinBallAddress, (LPCVOID)points, sizeof(points), NULL);
WriteProcessMemory(ProcessHandle, (LPVOID)PinBallAddress2, (LPCVOID)points, sizeof(points), NULL);
}
return (0);
}
and i'm getting this error
Originally Posted by
DevC++
Permission denied
ld returned 1 exit status
Help Anyone?
Thanks in Advance