O
O_Spring
I am writing a program in c#.
I would like to read a binary file to the standard input of a process (it is
flac.exe to encode/decode some files).
I have tried to use the following code :
StandardInputWriter = convertProcess.StandardInput;
[...]
byteRead = SourceFileStream.Read(buff,0,BUFFER_LENGTH);
StandardInputWriter.BaseStream.Write(buff,0,byteRead);
but it fails with somes files (whith custom chunk in the .wav input file).
However thhes files are well converted whne I use directly le flac.exe
command line. So it is the wrinting on the standard input which fails.
I think it is related to the fact that the standardInput is opened in text
mode (it uses a streamWriter)... is there an other way to write correctly
binay data to the standard input of a process ?
Thanks for your help
O_Spring
I would like to read a binary file to the standard input of a process (it is
flac.exe to encode/decode some files).
I have tried to use the following code :
StandardInputWriter = convertProcess.StandardInput;
[...]
byteRead = SourceFileStream.Read(buff,0,BUFFER_LENGTH);
StandardInputWriter.BaseStream.Write(buff,0,byteRead);
but it fails with somes files (whith custom chunk in the .wav input file).
However thhes files are well converted whne I use directly le flac.exe
command line. So it is the wrinting on the standard input which fails.
I think it is related to the fact that the standardInput is opened in text
mode (it uses a streamWriter)... is there an other way to write correctly
binay data to the standard input of a process ?
Thanks for your help
O_Spring