delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/10/12/10:32:47

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
From: Chris Faylor <cgf AT cygnus DOT com>
Date: Tue, 12 Oct 1999 10:33:45 -0400
To: Dirk Fieldhouse <fieldhouse AT logica DOT com>
Cc: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: windows consoles
Message-ID: <19991012103345.A770@cygnus.com>
Reply-To: cygwin AT sourceware DOT cygnus DOT com
Mail-Followup-To: Dirk Fieldhouse <fieldhouse AT logica DOT com>,
cygwin AT sourceware DOT cygnus DOT com
References: <199910121319 DOT OAA07178 AT cav DOT logica DOT co DOT uk>
Mime-Version: 1.0
X-Mailer: Mutt 0.95.6i
In-Reply-To: <199910121319.OAA07178@cav.logica.co.uk>; from Dirk Fieldhouse on Sun, Oct 10, 1999 at 01:18:46PM +0000

On Sun, Oct 10, 1999 at 01:18:46PM +0000, Dirk Fieldhouse wrote:
>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.

How about trying to open (or CreateFile) either the "CONIN$" or "CONOUT$"
device?  That should fail if you don't have a console.

-chris

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019