What's the point of...
... this hackery?
The above code interprets integers as pointers which is never good.
The following does not depend on the size of a DWORD * and makes more sense programmatically. Also, it doesn't use inline asm so it will work on any compiler, not just MSVC.
Not saying everyone else is wrong, just that I think my way is more independent of any compiler/architecture.
Edit: Use this
Code:
void __cdecl PushToConsole( const char* szCommand )
{
DWORD *LTClient = ( DWORD* )( 0x3778BFB0 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
The following does not depend on the size of a DWORD * and makes more sense programmatically. Also, it doesn't use inline asm so it will work on any compiler, not just MSVC.
Code:
blah blah the code I had wasn't quite right
Edit: Use this

