Guys, what was a purpose to hide ErrorString and not to include it in params?
process.pp
function RunCommandIndir(const curdir:string;const exename:string;const commands:array of string;out outputstring:string;out exitstatus:integer; Options : TProcessOptions = []):integer;
Var
p : TProcess;
i : integer;
ErrorString : String;
begin
p:=TProcess.create(nil);
if Options<>[] then
P.Options:=Options - ForbiddenOptions;
p.Executable:=exename;
if curdir<>'' then
p.CurrentDirectory:=curdir;
if high(commands)>=0 then
for i:=low(commands) to high(commands) do
p.Parameters.add(commands[i]);
result:=internalruncommand(p,outputstring,errorstring,exitstatus);
end;
Now I need to repeat this function in my code
And internalruncommand(...) is also hidden!
So I need to repeat it as well ...