On Thu, 31 Mar 2011, Darius Blaszyk wrote:
On Mar 31, 2011, at 10:37 AM, michael.vancann...@wisa.be wrote:
Do yourself a favour, and use ExecuteProcess from the sysutils unit for your
Exec routine. It has all you need. The use of pipes is not needed when
running the program, it will only seriously slow the running of the program.
But do not replace the unix fpexecv call; There will always be a difference
between Windows and Unix.
This simplifies things quite a bit. Thanks for the hint. Here's a new patch, I
also added a fix for the command line options issue. Should be alright now. All
examples work fine on win32.
Ok, last request:
Please use the ExecuteProcess variant with an array of string as second
parameter.
Reason: as soon as a command-line argument with spaces in it is passed to
the script, your code will mangle the arguments.
Michael.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal