Home > DeveloperSection > Forums > Get a numeric value or string from an address of an attached process
Pravesh Singh

Total Post:412

Posted on    December-18-2013 1:00 AM

 C# C# 

 1 Reply(s)
 1189  View(s)
Rate this:

I am building a small tool which allows me to edit in real time the memory of an attached process.

so the tool has 1 numericUpDown and 2 buttons, a get and a set.

my set code is as followed

private void sendButton_Click(object sender, EventArgs e)


    byte[] stat = BitConverter.GetBytes(Convert.ToInt32(statNumericUpDown.Value.ToString()));

    SetMemory(0x0175914a, stat);


where I am stuck is reversing that process so I can get numbers from my attached process and send them to my numericUpDown.

I hope I explained well enough and any help would be much appreciated.

ezra heywood
ezra heywood

Total Post:145

Posted on    December-18-2013 1:29 AM

Hi Pravesh,

Surely the reverse of the process would simply be the reverse of what you have, i.e.:

byte[] statBytes = GetMemory(0x0175914a);

int stat = BitConverter.ToInt32(statBytes);

statNumericUpDown.Value = stat;

The key is BitConverter.ToInt32 for converting from a byte[] to an Int32.

Don't want to miss updates? Please click the below button!

Follow MindStick