> Are you sure you're not thinking of Unix there? What you've described is
pretty much how it works for Unix applications that want to run without a
Probably was. I just checked AllocConsole and it states GUI apps are
created without a console as you said. Each process can have one console
only. Many processes can attach to same console. So console.out on GUIss
must point to a null stream (bit bucket) by default and VS probably attaches
a stream to console.out to get the output window?
You can create a new console and attach it to GUI, but that is not want most
folks want. Normally they want to attach to the console that started the
exe. I think I have seen that done in a hackish way, but think it had some
issues after closing console and/or gui or some other strange issues so not
sure there is fool proof way to do it currently. If there was, that sure
would be a nice feature to change in windows. No expert here, but I think
the loader could just place a handle to the current console somewhere so the
windows app could find it *directly if needed and attach to it. I think
this could eliminate the need to create two apps. Please advise if I am
in left field here. tia.
--
William Stacey, MVP
http://mvp.support.microsoft.com