Skip to content

Commit

Permalink
!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
guschin committed Jan 9, 2023
1 parent bfc1ac4 commit d15b413
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion DCLPlatform/uDCLUtils.pas
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ procedure ExecApp(const App: String; const CurrDir: String);
SI: TStartupInfo;
PI: TProcessInformation;
CmdLine: String;
cd:PChar;
begin
Assert(App <> '');

Expand All @@ -412,8 +413,11 @@ procedure ExecApp(const App: String; const CurrDir: String);
SI.wShowWindow := SW_SHOWNORMAL;

SetLastError(ERROR_INVALID_PARAMETER);
if CurrDir<>'' then
cd:=PChar(CurrDir);

{$WARN SYMBOL_PLATFORM OFF}
Win32Check(CreateProcess(nil, PChar(CmdLine), nil, nil, False, CREATE_DEFAULT_ERROR_MODE {$IFDEF UNICODE}or CREATE_UNICODE_ENVIRONMENT{$ENDIF}, nil, PChar(CurrDir), SI, PI));
Win32Check(CreateProcess(nil, PChar(CmdLine), nil, nil, False, CREATE_DEFAULT_ERROR_MODE {$IFDEF UNICODE}or CREATE_UNICODE_ENVIRONMENT{$ENDIF}, nil, cd, SI, PI));
{$WARN SYMBOL_PLATFORM ON}
CloseHandle(PI.hThread);
CloseHandle(PI.hProcess);
Expand Down

0 comments on commit d15b413

Please sign in to comment.