🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Console window

#9905
From: Sky
Date: Fri, 04 Jun 2004 02:04
19 lines
1274 bytes
hi all

A question about how to associate a console window
by SetStdHandle()

I have used the freopen() associate the console window,
but how to use the SetStdHandle() to redirect the STDOUT

I used the freopen() just like:
AllocConsole();
freopen("CONOUT$", "a+", stdout);

if I replace the freopen() with SetStdHandle()
SetStdHandle(STD_OUTPUT_HANDLE, ?);
what's data should be set for the second parameter?

TIA

Sky
Technical Details
Message-ID: <40bfd918$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsrout1.ntli.net!news-in.ntli.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,e90d6a2624240104,start
X-Google-Attributes: gid10cc67,public
Reply-To: "Sky" <huangc@motic.com>
From: "Sky" <huangc@motic.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Console window
Date: Fri, 4 Jun 2004 10:04:48 +0800
Lines: 21
Organization: Motic
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 218.85.121.51
Message-ID: <40bfd918$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1086314776 218.85.121.51 (3 Jun 2004 19:06:16 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsrout1.ntli.net!news-in.ntli.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail