d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Basic Writeprocessmemory > For Noobs Who Want To Learn
Add Reply New Topic New Poll
Member
Posts: 20,055
Joined: Oct 5 2007
Gold: 0.00
Jan 14 2018 08:38pm
#include <iostream>
#include "Windows.h"

using namespace std;

int restart = 0;

int main()
{

HWND hWnd = FindWindowA(NULL, "Minesweeper");
if (hWnd == NULL)
{
cout << "Fatal Error" << endl;
Sleep(500);
}
else {
DWORD pID;
GetWindowThreadProcessId(hWnd, &pID);
HANDLE hHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pID);

if (pID == NULL)
{
cout << "Another fatal error" << endl;
Sleep(500);
}
else {
WriteProcessMemory(hHandle, (LPVOID)0x0100579C, &restart, sizeof(restart), 0);
cout << "Success" << endl;
Sleep(500);
}
}
return 0;
}


this is not a tutorial.... this is for people who dont have the initiative to learn after writing their first "Calculator" or some other stupid basic code if this does not help you.... keep scrolling

im puttin this here in hopes it helps some 1 who can use their own common sense, its not hard. if u need help to understand or feel like this has helped you, dont hesitate to pm me.

ive seen alot of posts here about help but not many posts on this subject

will add and explain if it helps any 1. if not forget about it and it will be covered in time xD
Member
Posts: 1,977
Joined: Sep 28 2014
Gold: 7,168.00
Jan 15 2018 09:00pm
Reportet for explioting minesweeper
Member
Posts: 31,680
Joined: Nov 10 2007
Gold: 1.00
Mar 11 2018 06:38am
Quote (Gwiido @ 14 Jan 2018 21:38)
Code
#include <iostream>
#include "Windows.h"

using namespace std;

int restart = 0;

int main()
{

HWND hWnd = FindWindowA(NULL, "Minesweeper");
if (hWnd == NULL)
{
cout << "Fatal Error" << endl;
Sleep(500);
}
else {
DWORD pID;
GetWindowThreadProcessId(hWnd, &pID);
HANDLE hHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pID);

if (pID == NULL)
{
cout << "Another fatal error" << endl;
Sleep(500);
}
else {
WriteProcessMemory(hHandle, (LPVOID)0x0100579C, &restart, sizeof(restart), 0);
cout << "Success" << endl;
Sleep(500);
}
}
return 0;
}



this is not a tutorial.... this is for people who dont have the initiative to learn after writing their first "Calculator" or some other stupid basic code if this does not help you.... keep scrolling

im puttin this here in hopes it helps some 1 who can use their own common sense, its not hard. if u need help to understand or feel like this has helped you, dont hesitate to pm me.

ive seen alot of posts here about help but not many posts on this subject

will add and explain if it helps any 1. if not forget about it and it will be covered in time xD


WriteMemoryProcess is an acceptable approach for limited game hacking.
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll