I have the following batch script:
dir | myapp.exe
该方案有这一来源(更多或更少):
procedure TForm1.FormCreate(Sender: TObject);
var buff: String;
begin
Read(buff);
Memo1.Lines.Text:=buff;
end;
而电线中的产出是:
驱动C的体积没有标签。
我尝试:
- putting the read part into a loop with
eof
as a condition - somehow causing an infinite loop - writing a loop to keep reading until
strlen(buff)
is 0 - it exits the second time for some reason - reading stuff ever 0.5 seconds (I was thinking about asynchronous writes to stdin), this failed as well
这样,在没有数据的情况下直接实施该方案,就产生了《EInputOutput(I/O Error)代码6。