[fpc-pascal] TProcess vs RunProcess()
    Graeme Geldenhuys 
    mailinglists at geldenhuys.co.uk
       
    Fri Jan 27 18:24:38 CET 2017
    
    
  
On 2017-01-26 14:28, Michael Van Canneyt wrote:
> TProcess gives you full access to the process. You can kill it,
> pause it, write to stdin, read from stdout.
> 
> These things cannot be done with RunProcess. 
> That's one-shot and wait till it exits.
Another difference.... simply so others might learn from this discussion
(like I did).
If you have a huge list of parameters, RunProcess() - at least under
Windows - will most likely hit a 260 character limit, and then fail to
actually execute. I don't actually know where that 260 limit originates
from (Windows API, Command Prompt, FPC etc).
Whereas if you use TProcess and the Parameters (TStrings) property, you
don't have such a limitation.
This was what I experienced.
Regards,
  Graeme
-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
My public PGP key:  http://tinyurl.com/graeme-pgp
    
    
More information about the fpc-pascal
mailing list