can anyone tell me how many bytes for the char effects?
and anyone feeling extra generous - what do i set it to for dh cyclone?
thanks
<hr>
Append on Jun 29 2007, 15:49<hr>
Quote:
Originally posted by DyNy28@Jun 28 2007, 20:59
sorry dude!
|
NP man, thanks anyway.
Turns out i didn't fully understand how the memory addresses were working or how to read the bytes. its all working now. and some code samples for anyone working in C#
using System;
using System.Runtime.InteropServices;
using System.Text
// I am assuming that you already have the concept of the readProcessMemory() function.
// you will need the byte array and other variables
byte[] memory;
int bytesReadIn;
string result;
// To read a String from a 16 byte array. - the actual address for the character name, btw.
memory = processReader.ReadProcessMemory((IntPtr)005591676, 16,out bytesReadIn);
result = "";
for (int i=o; i < bytesReadIn; i++) {
result = result + Convert.ToChar(int32.Parse(memoru[i].ToString())).ToString();
}
// the bit i got stuck on, was converting the numeric values. a 1 byte is fine (i think) a 2 byte is converted form an Int16, a 4 byte is converted from an Int32 and so on..
// the silvers being carried
memory = processReader.ReadProcessMemory((IntPtr)5595108,4, out bytesReadIn);
// 4 bytes, so its an Int32
result = System.BitConverter.ToInt32(memory, 0).ToString();
I hope these little bits of code helps someone else in the future.
<hr>
Append on Jun 29 2007, 15:57<hr> oh, and for converting the values in this thread for ones you can use in C# this site helps.

- I have only got this working in C# using the Decimal values of the addresses provided. -> although I have been adding in the 00 in front of the address - am i doing this wrong? well... its working so i guess not.