Hello!
Sorry if my posting is a bit short, but im in hurry. In the evening i may add some more detailed description to it :P
Im using the following code to set up the objMgr in the TLS of my thread:
Code:
extern "C"
__declspec(dllexport)
void OnInject()
{
UIError(9, "OnInject");
LPDWORD curMgr = (LPDWORD)0x00C79CE0;
LPDWORD objMgr = (LPDWORD)((*curMgr) + 0x2ED0);
UIError(9, "ObjMgr loaded!");
__asm
{
push ecx
push eax
mov ecx, fs:[0x2C]
mov ecx, [ecx]
add ecx, 8
mov eax, objMgr
mov [ecx], eax
pop eax
pop ecx
}
MessageBox(0, "", "", MB_YESNO);
unsigned long long guid = GetActivePlayer();
char msg[255];
sprintf(msg, "%I64u", guid);
MessageBox(0, msg, "", MB_YESNO);
}
It has 2 big issues:
Randomly it crashes somewhere in the __asm-Block without a wow-exception-window but just "WoW has stopped working". If it works GetActivePlayer returns an incorrect GUID.
What am i doing wrong here?
/Edit:
It returns the correct GUID, that was my fault
Greetings
Cromon