I'm not sure why this is throwing an exception. I'm using a pointer to a struct(g_clientConnection) and I have another struct pointed to from that(s_curMgr). Here's my structs..
Code:
[StructLayout(LayoutKind.Explicit)]
public unsafe struct ClientConnection
{
[FieldOffset(0x2C34), MarshalAs(UnmanagedType.LPStruct)]
public S_ObjMgr* s_curMgr;
}
[StructLayout(LayoutKind.Explicit)]
public unsafe struct S_ObjMgr
{
[FieldOffset(0xC0)]
public UInt64 LocalGUID;
[FieldOffset(0xAC)]
public GameObject* FirstObject;
}
I'm declaring a pointer like this:
Code:
ClientConnection* cc = (ClientConnection*)0x1139F80;
textBox3.AppendText(cc->s_curMgr->FirstObj.ToString() + "\n");
Any tips why it isn't working? It's throwing an exception that I'm reading protected memory(0x777FFFF+ or something ridiculous like that).