haitao:
好像也是在循环,只是每次PeekNamedPipe都没发现有数据(bread=0),而命令行实际上正在不断地输出每一行的。。。。。
[阅读: 1779] 2007-09-27 04:26:13
PeekNamedPipe(read_stdout, pBuf, iBufSize, @bread, @avail, nil);
//check to see if there is any data to read from stdout
if (bread <> 0) then begin
if (iBufSize < avail) then begin // If BufferSize too small then rezize
iBufSize := avail;
ReallocMem(pBuf, iBufSize);
end;