[fpc-pascal] Re: Getting an output string from a TProcess

leledumbo leledumbo_cool at yahoo.co.id
Sat Jun 2 07:52:32 CEST 2012


> Commandline is signed as deprecated, so what is the best way to 
pass a string to TProcess? Is the  commandline the first item of the 
tstrings called parameter?

http://www.freepascal.org/docs-html/fcl/process/tprocess.commandline.html

See something that explains it there?

> The output is a class derived from THandleStream. As the read 
method is override, its behaviour is different from TStream. 

Not really, it still conforms to the Read method of TStream, the
implementation should of course be adjusted to read from a process' output
stream.

> So I ask: what's the correct code to inform as argument a TProcess and 
a instruction string and as a return, to get the output string?

http://wiki.lazarus.freepascal.org/Executing_External_Programs#TProcess

--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Getting-an-output-string-from-a-TProcess-tp5709934p5709938.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.



More information about the fpc-pascal mailing list