This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: windows consoles


On Sun, 10 Oct 1999 07:22:20 +0300 (FLE Daylight Time), Tor Lillqvist <tml at iki dot fi>
wrote:

>Earnie Boyd writes:
> > Isn't there a CreateConsole() function?
>
>There is AllocConsole(). After calling that you can (at least in
>mingw32 programs) do freopen ("CONOUT$", "w", stdout).

A problem is that you can't tell whether your Windows program needs you to do AllocConsole at all. Supposedly (ie according to the Win32 API spec) AllocConsole fails if you already have one.

However under W95 this doesn't happen. You always get another console window, even if you started the program from a command prompt. Alternatively, your console output all goes into the bitbucket in the sky. There seems to be no way to access the command window from which you started an executable built for the Windows subsystem.

-- 
Dirk Fieldhouse                 Logica UK Limited
fieldhouse@logica.com           75 Hampstead Road
c=gb;a=attmail;p=logica;        London NW1 2PL
o=LOGICA;ou1=UK;s=fieldhouse    UK
+44 (20) 7637 9111

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]