🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #4006

Re: Finding whether Console app has a window

#4006
From: Bob Gonder
Date: Fri, 31 Mar 2006 00:15
16 lines
1570 bytes
Richard Casten wrote:

>"Remy Lebeau (TeamB)" wrote:
>
>> Use GetStdHandle() or CreateFile() to retreive the process's console handles
>> and then check if they are assigned or not.
>
>How do I determine if they are assigned or not?

Return value should be INVALID_HANDLE_VALUE

Note that the stdin/stdout might be redirected, with no visible
console, and the above would return valid handles.

Depending on your needs, you might see if GetConsoleTitle() returns an
error if no console is visible.
Technical Details
Message-ID: <gpso22ph3nbmmsnr8fi92lfcmplpdpnoj2@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44171EF9.DD8A51D0@aero.org> <44176d47@newsgroups.borland.com> <442C6CDC.AC3B927E@aero.org>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,8446b6f28f0db0be
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Finding whether Console app has a window
Date: Thu, 30 Mar 2006 16:15:13 -0800
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <gpso22ph3nbmmsnr8fi92lfcmplpdpnoj2@4ax.com>
References: <44171EF9.DD8A51D0@aero.org> <44176d47@newsgroups.borland.com> <442C6CDC.AC3B927E@aero.org>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 71.49.212.29
X-Trace: newsgroups.borland.com 1143764111 71.49.212.29 (30 Mar 2006 16:15:11 -0700)
Lines: 19
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!news2.euro.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail