You can create one with AllocConsole(). Something like the following would work:
conout = CreateFile("CONOUT$", GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE, 0L, OPEN_EXISTING, 0, 0L);
if (conout == 0L || conout == INVALID_HANDLE_VALUE) {
AllocConsole();
conout = CreateFile("CONOUT$", GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE, 0L, OPEN_EXISTING, 0, 0L);
if (conout == 0L) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"can't attach or create a console.",0L));
return TCL_ERROR;
}
}
--
Thank you. before I begin, I'd like everyone to notice that my report is in
a professional, clear plastic binder...When a report looks this good, you know
it'll get an A. That's a tip kids. Write it down. -- Calvin