I've injected a dll into wow.
I tried to use the CInputObject.GeMovementFlag() and I've got a runtime error:
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
I inject the code using BlackMagic library, in C#.extern "C"
{
CSEXPORT(ULONG) GetMovementFlag(void);
};
CSEXPORT(ULONG) GetMovementFlag()
{
CInputControl * gpInputControl = reinterpret_cast<CInputControl*>( *reinterpret_cast<DWORD*>(0x01175994) );
return gpInputControl->GetMovementFlag();
}
unsigned long CInputControl::GetMovementFlag()
{
return *reinterpret_cast<unsigned long*>( this + 4 );
}
The dll of course is in C++
I don't know what the problem is..