I've already tried taking two old WoW binaries and comparing them for patterns.
As it turns out, BlackMagic isn't working properly because the call to ReadProcessMemory is failing. I originally thought that it was failing because I gave bad offsets but I've figured out this is not the case. I'm a Java guru, I don't know to much about C# so any assistance will be greatly appreciated.
Invocation:
Code:
if (!Imports.ReadProcessMemory(hProcess, dwAddress, lpBuffer, nSize, out lpBytesRead))
throw new Exception("ReadProcessMemory failed");
Declaration:
Code:
[DllImport("kernel32", EntryPoint = "ReadProcessMemory")]
public static extern bool ReadProcessMemory(
IntPtr hProcess,
uint dwAddress,
IntPtr lpBuffer,
int nSize,
out int lpBytesRead);
Stack trace:
Code:
Unhandled Exception: System.Exception: ReadProcessMemory failed
at Magic.SMemory.ReadBytes(IntPtr hProcess, UInt32 dwAddress, Int32 nSize) in c:\Users\Admin\Desktop\BlackMagic\Source\BlackMagic\Static Classes\SMemory.cs:line 78
at Magic.SMemory.ReadUInt(IntPtr hProcess, UInt32 dwAddress, Boolean bReverse) in c:\Users\Admin\Desktop\BlackMagic\Source\BlackMagic\Static Classes\SMemory.cs:line 226
at Magic.BlackMagic.ReadUInt(UInt32 dwAddress, Boolean bReverse) in c:\Users\Admin\Desktop\BlackMagic\Source\BlackMagic\BMMemory.cs:line 309
at Magic.BlackMagic.ReadUInt(UInt32 dwAddress) in c:\Users\Admin\Desktop\BlackMagic\Source\BlackMagic\BMMemory.cs:line 293
Exact same problem as this person ((Tutorial) Starting WoW-Memory Reading/Writing).
Except mine hasn't randomly gone away yet.