Step 1: Create your basic DllMain function.
[php] BOOL WINAPI DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
MessageBoxA(0, "WOOO!! Vengeance!!", "Yup", 0);
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)&Hack, NULL, NULL, NULL);
Step 2A: Create the basic function to manipulate unauthorized Console commands.
[php]void __cdecl PushToConsole(const char* szCommand)
DWORD *LTClient = (DWORD*)(0x3778BFB0);
void* CONoff = (void*)*(DWORD*)(*LTClient + 0x208);
add esp, 4;
Step 2B: The line:
DWORD *LTClient = (DWORD*)(0x3778BFB0);[/php]
Step 3: Now you can use your "PushToConsole" function to use commands, and bind them to hotkeys via GetASyncKeyState or some other form of keyboard hooking.
if (GetASyncKeyState(VK_ADD) & 0x8000)
And if you can't understand the last bit, you shouldn't be reading this anyways but that watches for you to hit a particular key, and executes a Console command that will put the game into Windowed Mode.
P.S. Current L.T.Client address at the time of this post is:
I did not discover any of this, I took this from several threads on MPGH, and de-dumbified it, and put it all in one place for people who understand the C/C++ language and just want to get a quick view/tutorial on how to make a Combat Arms hack.