CF Console

Posts 1–2 of 2 · Page 1 of 1
CF Console
Hey, I rarely see any working src codes around here.

Here is a simple src for console, you can do things such as white boxes, skeleton, etc.. like this;

Code:
SetConsoleVariable("ModelDebug_DrawBoxes 1");
Credits to fatboy88 for the original concept, me for updating addresses.

Code:
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);
I tried it. But i get serveral compiler errors like:

DWORD does not name a type

Here is my code:
Code:
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;
}
Whats wrong with it?
Posts 1–2 of 2 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us