git-svn-id: trunk@28975 -
@@ -211,9 +211,7 @@ var
Prio: byte;
DSS: boolean;
SR: SearchRec;
-
-const
- MaxArgsSize = 3072; (* Amount of memory reserved for arguments in bytes. *)
+ MaxArgsSize: word; (* Amount of memory reserved for arguments in bytes. *)
begin
{ LastDosExitCode := Exec (Path, ExecRunFlags (ExecFlags), efDefault, ComLine);}
@@ -226,6 +224,7 @@ begin
else
QName := Path;
FindClose (SR);
+ MaxArgsSize := Length (ComLine) + Length (QName) + 256; (* More than enough *)
if ComLine = '' then
Args0 := nil;
@@ -750,9 +750,9 @@ var
ObjName: shortstring;
RC: cardinal;
ExecAppType: cardinal;
const
ObjBufSize = 512;
function StartSession: cardinal;
@@ -845,6 +845,7 @@ begin
if (ApplicationType and 3 = ExecAppType and 3) then
(* DosExecPgm should work... *)
+ MaxArgsSize := Length (ComLine) + Length (Path) + 256; (* More than enough *)