Code:
LUASetTarget(pThis->GUID);
//Sleep(50);
DWORD Stage1 = RInt(dwCurObj);
DWORD Stage2 = RInt((Stage1+(36*4)));
DWORD MGR = this->dwCurMgr;
DWORD ProcessId = GetCurrentProcessId();
DWORD ProcessThreadId = GetProcessThreadId( ProcessId );
HANDLE hThread = OpenThread( THREAD_GET_CONTEXT | THREAD_SET_CONTEXT | THREAD_SUSPEND_RESUME, TRUE, ProcessThreadId );
SuspendThread(hThread);
__asm
{
mov edx, dword ptr ds:[MGR]
mov eax, dword ptr fs:[0x2C]
add eax, 8
mov dword ptr ds:[eax], edx//put MGR into TIB
mov ecx, dword ptr ds:[dwCurObj]
call [Stage2]
}
ResumeThread(hThread);
return;
Any ideas why the code could execute yet not actually interact? All addy's and offsets seem to be correct...
LUASetTarget works fine, no need for concern over that, just that even after putting curMgr into the Therad Information Block and calling ->Interact() nothing happens. No crash, nada.
Thanks,
Leo