|
You have to edit the source and make it possible. That cls thing is very complicated even for me,
I don't know about CPP but on delphi, there is a type of stream that works with handles.
You just detect a certain type of handle, which is simple, just detect stdin and stdout.
You don't have to worry of how to exchangd data between freearc and precomp, with handles all you have to do is read using the stdin handle stream thenfrom there you let precomp handle the data then you send the output back to freearc, simple as that, progress will move automatically. The only tip I can give you is to never write anything on cmd window because that is also regarded as stdout data.
Here is a simple example but in delphi
var
hs1, hs2: THandleStream;
begin
hs1:= Thandlestream.create(GetStdHandle(STD_INPUT_HANDLE )) ;
hs2:= THandleStream.create(GetStdHandle(STD_OUTPUT_HANDL E));
hs1.read.... or use copyfrom to get data directly from freearc <stdin>
//precomp should process the data here...
hs2.write or hs2.copyfrom to send the processed/unpacked data back to freearc //this moves the progress bar.
If I knew the header structure of precomp, I could make precomp that uses stdin and stdout for unpacking to show progress.
|