chore(windows): remove unused utilrun unit

This commit is contained in:
Marc Durdin 2021-05-11 08:38:07 +10:00
parent b614ee7c53
commit cfea41382c
3 changed files with 0 additions and 52 deletions

View file

@ -115,7 +115,6 @@ uses
VKeyChars in '..\..\global\delphi\general\VKeyChars.pas',
UserMessages in '..\..\global\delphi\general\UserMessages.pas',
DebugPaths in '..\..\global\delphi\general\DebugPaths.pas',
utilrun in 'util\utilrun.pas',
keyman_msctf in '..\..\global\delphi\winapi\keyman_msctf.pas',
Unicode in '..\..\global\delphi\general\Unicode.pas',
utilexecute in '..\..\global\delphi\general\utilexecute.pas',

View file

@ -255,7 +255,6 @@
<DCCReference Include="..\..\global\delphi\general\VKeyChars.pas"/>
<DCCReference Include="..\..\global\delphi\general\UserMessages.pas"/>
<DCCReference Include="..\..\global\delphi\general\DebugPaths.pas"/>
<DCCReference Include="util\utilrun.pas"/>
<DCCReference Include="..\..\global\delphi\winapi\keyman_msctf.pas"/>
<DCCReference Include="..\..\global\delphi\general\Unicode.pas"/>
<DCCReference Include="..\..\global\delphi\general\utilexecute.pas"/>

View file

@ -1,50 +0,0 @@
(*
Name: utilrun
Copyright: Copyright (C) 2003-2017 SIL International.
Documentation:
Description:
Create Date: 25 Jan 2011
Modified Date: 25 Jan 2011
Authors: mcdurdin
Related Files:
Dependencies:
Bugs:
Todo:
Notes:
History: 25 Jan 2011 - mcdurdin - I2569 - Keyboard welcome from kmshell - run util
*)
unit utilrun;
interface
function Run(CmdLine: WideString): Boolean;
implementation
uses
Windows;
function Run(CmdLine: WideString): Boolean;
var
si: TStartupInfoW;
pi: TProcessInformation;
begin
Result := False;
FillChar(si, sizeof(TStartupInfoW), 0);
FillChar(pi, sizeof(TProcessInformation), 0);
si.cb := sizeof(TStartupInfo);
si.dwFlags := STARTF_USESHOWWINDOW;
si.wShowWindow := SW_SHOWNORMAL;
// TODO: parse CmdLine and pass correct first parameter - I2934 test app crashes when NULL passed as first parameter, find out why?
// TODO: Set UNICODE_ENVIRONMENT flag and pass the environment variables? - I2934
if CreateProcessW(nil, PWideChar(CmdLine), nil, nil, false, NORMAL_PRIORITY_CLASS, nil, nil, si, pi) then
begin
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
Result := True;
end;
end;
end.