flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
crc
Is it possible to redirect stdin and stdout for a Windows Console application? For example could I do:
Code:
rf <somefile.rf
|
|||
![]() |
|
coconut
|
|||
![]() |
|
djca
Actually there is Iczelion tutorial about pipes (tut. N21). I test it but the pipe works with console apps and not with plain dos com files
|
|||
![]() |
|
crc
I finally found a way to do what I want without causing major design headaches
![]() Code: ; Original Lines invoke WriteConsole, [StdOut], emit_buffer, 1, 0, 0 invoke ReadConsole, [StdIn], emit_buffer, 1, written_buffer, 0 ; Change to: invoke WriteFile, [StdOut], emit_buffer, 1, 0, 0 invoke ReadFile, [StdIn], emit_buffer, 1, written_buffer, 0 By making the above change, my console apps can now have I/O redirected from the command line. No need for child processes, pipes, etc ![]() |
|||
![]() |
|
f0dder
Aha, so read/writeconsole don't handle redirection? - interesting! Never used those APIs, so didn't know it was something that simple
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.