#include <stdio.h>
#include <windows.h>

void main(int argc, char** argv)
{
	HANDLE h = ::GetStdHandle(STD_OUTPUT_HANDLE);
	unsigned long written;
	char buffer[256];
	for (int i= 0; i<100; i++) {
		sprintf(buffer,  "Hello world %d\r\n", i+1);
		::WriteFile(h, buffer, strlen(buffer), &written, NULL);
		//printf(buffer);
	}
	::CloseHandle(h);
	Sleep(1000);
}

