SetConsoleVariable("ModelDebug_DrawBoxes 1");
typedef void (__cdecl *lpSetConsoleVariable)(char* szVal);
lpSetConsoleVariable SetConsoleVariable;
DWORD CShellBase = (DWORD)GetModuleHandle("CShell.dll");
PDWORD iClient = ( PDWORD )( CShellBase + 0x228110 );// CShell.dll+0x228110 as of today May 6th.
DWORD Console = *( PDWORD )( *iClient + 0x1F8 );
SetConsoleVariable = (lpSetConsoleVariable)(Console);
typedef void (__cdecl *lpSetConsoleVariable)(char* szVal);
lpSetConsoleVariable SetConsoleVariable;
DWORD CShellBase = (DWORD)GetModuleHandle("CShell.dll");
PDWORD iClient = ( PDWORD )( CShellBase + 0x228110 );// CShell.dll+0x228110 as of today May 6th.
DWORD Console = *( PDWORD )( *iClient + 0x1F8 );
SetConsoleVariable = (lpSetConsoleVariable)(Console);
BOOL APIENTRY DllMain (HINSTANCE hInst /* Library instance handle. */ ,
DWORD reason /* Reason this function is being called. */ ,
LPVOID reserved /* Not used. */ )
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
SetConsoleVariable("ModelDebug_DrawBoxes 1");
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
/* Returns TRUE on success, FALSE on failure */
return TRUE;
}