Command Line Processing

  • Thread starter Thread starter nwsgrp1
  • Start date Start date
N

nwsgrp1

I wounder if anyone here can either direct me to the correct group to
answer this question or maybe explain to me how the cmd console
processes attributes. My problem is:

I have a GUI application that can detect if it's executed from a
command line. If it has all messageboxes are outputted as text to the
console. But when I try to redirect to a logfile like this
"c:\myapp_dir>myapp /? > logfile.log" it stops outputing to screen and
I get a ERROR_INVALID_HANDLE when calling WriteConsole() method. Also
"logfile.log" is empty.

Anybody know why? Or know where to look for possible answer?

Regards,
Carl.
 
I wounder if anyone here can either direct me to the correct group to
answer this question or maybe explain to me how the cmd console
processes attributes. My problem is:

I have a GUI application that can detect if it's executed from a
command line. If it has all messageboxes are outputted as text to the
console. But when I try to redirect to a logfile like this
"c:\myapp_dir>myapp /? > logfile.log" it stops outputing to screen and
I get a ERROR_INVALID_HANDLE when calling WriteConsole() method. Also
"logfile.log" is empty.

If you redirect to a text file (>) then console output stops. You
generally have to pipe it to a text file (¦). I don't recall the syntax
or have my huge DOS reference handy, but that might give you a clue.

As to why the file is empty, I'm not sure. It sometimes happens when an
EOF marker is not created.
 
Did you look up the API (which talks about reasons for failing). Ask in programming groups.
 
Mike said:
If you redirect to a text file (>) then console output stops. You
generally have to pipe it to a text file (¦). I don't recall the syntax
or have my huge DOS reference handy, but that might give you a clue.

As to why the file is empty, I'm not sure. It sometimes happens when an
EOF marker is not created.

I think it's something to do with the console not being a true command
line interface but a GUI windows acting as one. So when I
programatically connect to the console and send text via stdout this
isn't captured by the redirect for some reason, maybe a different
stdout stream!

Thanks for the suggestion.
 
Mike said:
If you redirect to a text file (>) then console output stops. You
generally have to pipe it to a text file (¦). I don't recall the syntax
or have my huge DOS reference handy, but that might give you a clue.

As to why the file is empty, I'm not sure. It sometimes happens when an
EOF marker is not created.

I think it's something to do with the console not being a true command
line interface but a GUI windows acting as one. So when I
programatically connect to the console and send text via stdout this
isn't captured by the redirect for some reason, maybe a different
stdout stream!

Thanks for the suggestion.

=============

Redirection is understood by the Command Processor cmd.exe only,
not by the GUI.
 
Keep wastring others time. Question was answered by me. Obviously you are far too stupid.
 
"David Candy" <.> wrote in message
Keep wastring others time. Question was answered by me. Obviously you are
far too stupid.

============

Up to your usual abusive self again?
 
Back
Top