The MASM Forum

General => The Workshop => Topic started by: bomz on August 24, 2021, 09:41:02 PM

Title: Console additional descriptors
Post by: bomz on August 24, 2021, 09:41:02 PM
MSDN say that exist console applications possibility to use besides well known stdin stdout and stderr additional descriptors 3-9.
but how create and use it unknown. if it CreateConsoleScreenBuffer to what numbet it have? each new 3 - 4 -5 .... ?
Title: Re: Console additional descriptors
Post by: Vortex on August 25, 2021, 05:48:55 AM
Hi bomz,

Sorry if I am missing something but I guess we discussed about the streams :

http://masm32.com/board/index.php?topic=9430.msg103248#msg103248
Title: Re: Console additional descriptors
Post by: bomz on August 25, 2021, 10:59:30 AM
I don't understand well what in English call stream and what pipe.
We are talking about redirect streams, problems was that console function not allow redirect
redirect support only readfile writefile

now I am talking about additional descriptors (streams), not stdout stderr stdin, but additional 4-9
I make little experiment 3 stream already in use.
I want my application IN data through stdin, OUT log through stderr, OUT data through stdout,
OUT headers through additional 4 stream, OUT certificate headers through 5 stream and OUT certificate data through 6 stream
so I may use such constructions in batch files
(echo refer:http://masm32.com/)|cdownload http://masm32.com/>&2 2>err.log 3>nul 4>headers.log 5>certheaders.log 6>cert.log