Ludo Brands: > If you need these handles from the child process use: > InHnd:=GetStdHandle(STD_INPUT_HANDLE); > OutHnd:=GetStdHandle(STD_OUTPUT_HANDLE); > ErrHnd:=GetStdHandle(STD_ERROR_HANDLE);
Thank you, that's what I need. By the way, it does work in a simple single-process applica- tion: Program Test; uses Windows; var hIn: LongWord; buf: ShortString; bytesRead: LongWord; begin hIn := GetStdHandle(STD_INPUT_HANDLE); while(true) do begin ReadFile(hIn, buf[1], 5, bytesRead, nil); buf[0] := Chr(bytesRead); write(buf); end; end. It is interesting to note that even this code reads input only after Enter is pressed. Anton _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal