How do i add a offset of 30 to this address im baffled 687138C8.
I want to change this bit here v to this address <687138C8> with the offset of 30.
if(!ReadProcessMemory(hprocess, (void *)0x6EC3F940, (void *)&lua, sizeof(lua), NULL)) {
And make it so this write works.this address is shity no static address 6EC3F940.
if(!WriteProcessMemory(hprocess, (void *)0x6EC3F940, &luamore, (DWORD)sizeof(luamore), NULL)) {
Some body help
it gets the value and sets it to 1 or what ever i have luamore set to but i need to add a offset so i can use a permanent address
http://imgur.com/s7sjwvM,W7DCbQz
// sc2min.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <Windows.h>
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
cout << "Mpgh.\n\n";
HWND sc2window = FindWindow(0, _T("mpgh"));
HANDLE hprocess;
DWORD pid;
int lua;
int luamore = 1;
if(!sc2window) {
cout << "mpgh not found";
} else {
GetWindowThreadProcessId(sc2window, &pid);
hprocess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);
if(!hprocess) {
cout << "Couldnt open process";
} else {
if(!ReadProcessMemory(hprocess, (void *)0x6EC3F940, (void *)&lua, sizeof(lua), NULL)) {
cout << "Failed to read memory";
} else {
cout << "Value found: " << lua << "\n\n";
if(!WriteProcessMemory(hprocess, (void *)0x6EC3F940, &luamore, (DWORD)sizeof(luamore), NULL)) {
cout << "failed to write memory";
} else {
cout << "mpgh.\n\n";
if(!ReadProcessMemory(hprocess, (void *)0x6EC3F940, (void *)&lua, sizeof(lua), NULL));
cout << "Value = " << lua << "\n\n";
}
}
}
}
CloseHandle(hprocess);
cout << "Completed sucessfully.";
cin.get();
return 0;
}