POV-Ray : Newsgroups : povray.off-topic : Colour consoles : Re: Colour consoles Server Time
7 Sep 2024 03:24:02 EDT (-0400)
  Re: Colour consoles  
From: Invisible
Date: 20 Aug 2008 10:54:03
Message: <48ac300b$1@news.povray.org>
Fredrik Eriksson wrote:

> http://msdn.microsoft.com/en-us/library/ms682088.aspx

Oh. My. God.

I literally can't believe this... I just wrote and compiled a C program 
that calls the Win32 API directly, AND IT FRIGGIN WORKED!! 0_0

*dies*

I would never have believed it was possible... I was sure it would 
blue-screen the machine or crash spectacularly, but no, it actually 
worked properly. (AND, best of all, it IS possible to change the colour 
of just some characters in a console window. I wasn't sure it could be 
done.)

I was a little shocked to discover that I already have the necessary C 
header files. And, obviously, it took a litle while to figure out how to 
make my Haskell compiler compile raw C files instead of Haskell programs.

The hardest part was figuring out what "warning: function foo() defined 
implicitly" means. Apparently it means you spelt the function's name 
wrong, so the compiler couldn't find it in the header file. This also 
causes the linker to make rude comments.

But once you get over all of these things... my God, I made a direct OS 
call and *didn't* crash the OS. Astonishing!

I think I need to go sit down...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.