<span style="font-size:18px;">HANDLE hOutput;
void console_init(void)
{
AllocConsole();
SetConsoleTitle("Debug Window");
hOutput=GetStdHandle(STD_OUTPUT_HANDLE);
//FreeConsole();
}
void DebugPrint(char *fmt, ...)
{
DWORD uLen;
char buffer[4096];
int arg;
arg = (int)&fmt + sizeof(int);
vsprintf(buffer, fmt, (char *)arg);
WriteConsole(hOutput, buffer, strlen(buffer), &uLen, NULL);</span>