DarkArlene How do I cheat?
Reputation: 0
Joined: 19 Jul 2013 Posts: 5
|
Posted: Fri Jul 19, 2013 2:09 pm Post subject: [C#] Write String into memory + ProcessModule |
|
|
Hello i'm using memory api from this forum (viewtopic.php?t=530207)
what i found by cheat engine is in attachment
and this is my code and i can't find out what's wrong, could you pls help me out ?
| Code: |
Memory myMemory = new Memory();
Process[] myProcess;
//string Pointer = "00ACE9E4";
int[] Offsets = { 0x80, 0x4, 0x0, 0x8, 0x21C};
public static int base_adress;
myProcess = Process.GetProcessesByName("name of process");
myMemory.ReadProcess = myProcess[0];
myMemory.Open();
ProcessModuleCollection modules = myProcess[0].Modules;
foreach (ProcessModule module in modules)
{
if (module.ModuleName == "Game.dll")
{
base_adress = module.BaseAddress.ToInt32();
}
}
// int pointerAddress = HexToDec(Pointer);
int Adress = base_adress + 0x00ACE9E4; //+ pointerAddress;
int bytesWritten;
byte[] valueToWrite = Encoding.ASCII.GetBytes(textBox2.Text);
string writtenAddress = myMemory.PointerWrite((IntPtr)Adress, valueToWrite, Offsets, out bytesWritten);
myMemory.CloseHandle();
|
| Description: |
|
| Filesize: |
96.42 KB |
| Viewed: |
6276 Time(s) |

|
|
|