Hey, i have a problem...i like to read the name of the names of my sro chars from the memory... i tryed it with this code, but i get a empty string...
anyone know what is wrong?
class Program
{
[DllImport("Kernel32.dll")]
public static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, UInt32 nSize, ref UInt32 lpNumberOfBytesRead);
[DllImport("kernel32.dll")]
public static extern IntPtr OpenProcess(uint dwDesiredAccess, bool bInheritHandle, int dwProcessId);
static void Main(string[] args)
{
foreach (Process p in Process.GetProcessesByName("sro_client"))
{
byte[] buffer = new byte[24];
uint Size = 24;
IntPtr handle = OpenProcess(0x10, false, p.Id);
ReadProcessMemory(handle, (IntPtr)0xD940A8, buffer, (uint)buffer.Length, ref Size);
string i = Encoding.Unicode.GetString(buffer);
Console.WriteLine(i.Length);
Console.WriteLine(i);
}
Console.Read();
}
}
try for you help (: