A handle can refer to either a file or a device. MS-DOS predefines five standard handles. These handles are always open; you needdn't open them before you use them.
Question is: Is the same apply for win32 for a console program. Or is it totaly different??? like: input output put kaput I'm not joking, simply I dunno.:confused: forge
0 Input 1 Output 2 Error 3 Auxiliary 4 Printer
forge, This is true for C Programming, as it maps them to 'real' handles, remember using 0 in unix as well as Windows equates to the same handle, but they are on entirely different operating systems... To really get the handles use GetStdHandle with one of :- STD_INPUT_HANDLE Standard input handle STD_OUTPUT_HANDLE Standard output handle STD_ERROR_HANDLE Standard error handle umbongo
Thanks umbongo for prompt and clear reply, I learn that you can get unlimited screen output handles with GetStdHandle and every indentical handle will have different numerical value. I hope this is right. forge