unrar.exe and | pipe on windows
I just downlo开发者_开发知识库aded the freeware unrar.exe from winrar website. If, from the command line, you tipe
unrar.exe p -inul myarchive.rar
It "prints" out to default std the content of my archive. Since the archive is just one .avi file, if I do:
unrar.exe p -inul myarchive.rar > output.avi
It works perfectly. Now, I'd need to redirect the output std of this program to the input std on a program of mine. This means that I do:
unrar.exe p -inul myarchive.rar | myprogram.exe
myprogram.exe is just a simple c file that every second (this means: very slowly) reads a char from standard input and prints it to screen. After approximately 10000 chars, I get only the -1 byte (FF in hexadecimal representation).
Why this? How can I solve this problem?
精彩评论