jajaja yeah i know, i only found that and try do that xDCode:#include <windows.h>
#include <iostream>
using namespace std;
int main()
{
LONG address = 0x004972A7;
BYTE newvalue[] = {0xb8, 0xff, 0xff, 0x00, 0x00};
HANDLE phandle;
HWND hwnd = FindWindow(0, "GunZ");
DWORD pid;
if(!hwnd) {
cout << "Error: Cannot find window!" << endl;
cin.get();
} else {
GetWindowThreadProcessId(hwnd, &pid);
phandle = OpenProcess(PROCESS_ALL_ACCESS, 0, pid);
if (phandle != 0) {
WriteProcessMemory(phandle, (LPVOID)address, (LPVOID) &newvalue, sizeof(newvalue), 0);
cout << "Memory wrote successfully.";
cin.get();
} else {
cout << "Couldn't get a handle";
cin.get();
}
}}
Add:
Code for VB.NET ^^
Sometimes get error i dont know =/ if someone can help with this thanks hehehe
P.D. I Try with this and change the the bytes good but yet i cant start the runnable =/Code:Imports System.Runtime.InteropServices
Public Class Form1
<DllImport("kernel32.dll")> _
Public Shared Function WriteProcessMemory( _
ByVal hProcess As IntPtr, _
ByVal lpBaseAddress As IntPtr, _
ByVal lpBuffer As Byte(), _
ByVal nSize As UInt*** _
ByRef lpNumberOfBytesWritten As UInt32 _
) As Boolean
End Function
Dim p As Process() = Process.GetProcessesByName("Gunz")
Dim en1 As Byte() = {&HB8, &HFF, &HFF, &H0, &H0} 'Bytes of MOV EAX,0FFFF
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
WriteProcessMemory(p(0).Handle, &H4972A7, en1, en1.Length, 0) '4972A7 is the Adress
MsgBox("Nice")
End Sub
End Class

