Closed GoogleCodeExporter closed 9 years ago
I have just came across this issue too and it seems that the first argument is
"disappearing". What I have found is that the CreateProcess is working
correctly but it is how the application receives the command line information.
Work around:
Put a dummy command line argument as the first argument (such as the
executable).
Code fix:
function TDebugger.StartProcessToDebug(executable: string): Boolean;
var
StartInfo: TStartupInfo;
ProcInfo: TProcessInformation;
parameters: string;
begin
parameters := Configuration.getApplicationParameters;
log.log('Trying to start ' + executable + ' with the parameters :' + parameters);
fillchar(StartInfo, sizeof(TStartupInfo), #0);
fillchar(ProcInfo, sizeof(TProcessInformation), #0);
StartInfo.cb := sizeof(TStartupInfo);
parameters := '"' + executable + '" ' + parameters;
result := CreateProcess(nil, pchar(parameters), nil, nil, false,
CREATE_NEW_PROCESS_GROUP + NORMAL_PRIORITY_CLASS + DEBUG_PROCESS, nil, nil, StartInfo, ProcInfo);
end;
Original comment by ring....@gmail.com
on 10 Aug 2010 at 8:56
Original comment by ring....@gmail.com
on 20 Oct 2011 at 12:42
Original issue reported on code.google.com by
michael....@gmx.net
on 30 Jun 2010 at 10:37