Marco van de Voort wrote:

> Can you add the following to TProcess instead of using the CommandLine 
property:
> example:
> property ProcessName: String - the process to be executed
> property Params : TStringList - list of command line params to be
> passed to the process
>
> Why should quote characters be stripped as it is in the current
> implementation?

When executing, there is a difference between shell notation and the
programming interface.

e.g.

program name parammeter 1 parameter 2 parameter 3

should be written on the cmdline as

"program name" "parameter 1" "parameter 2"  "parameter 3"

But should be passed to a kernel function as:
filename:='/full/path/to/program name';  // no quotes;
param[0]:='parameter 1';                 // no quotes;
param[1]:='parameter 2';                 // no quotes;
param[2]:='parameter 3';                 // no quotes;

This is the difference between shell api and deeper api. E.g

        shell                   deeper
Unix:  (fp)system()              (fp)exec*
winxx:  shellexecute            createprocess

Another usual difference between these two is that the shell versions search
for the binary, while you need to pass full path to the "deeper" category of
functions.

Thanks for the explanation.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to