Yay!



For anyone interested, here's a quick 'n dirty example of how to create a console and print info to it:
Code:
#include <acknex.h>
#include <default.c>
#include <litec.h>
#include <windows.h>
#include <stdio.h>

DWORD consoleOutput;

void logToConsole(STRING* logStr)
{
	
	var out, out2;
	WriteFile(consoleOutput, logStr, str_len(logStr), &out, &out2);
//line break:
	WriteFile(consoleOutput, "\n", 1, &out, &out2);
	
	
}

void main()
{
	video_screen = 0;
	AllocConsole();
	SetConsoleTitle("CSiS Dedicated Server");
	
	consoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
	
	logToConsole("Hello World");
	
	wait(3);
}




It's interesting how "WriteFile" works to write into a console - which isn't really a file. I must admit I don't fully understand what I did above. But it works...

Last edited by Germanunkol; 10/24/10 17:08.

~"I never let school interfere with my education"~
-Mark Twain