mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Request elevation from another thread
This commit is contained in:
parent
1cee255933
commit
a5be2a12fa
2 changed files with 4 additions and 4 deletions
|
|
@ -37,7 +37,7 @@ type
|
|||
implementation
|
||||
|
||||
uses
|
||||
RtlConsts, DCOSUtils, Dialogs, UITypes, uElevation, uSuperUser;
|
||||
RtlConsts, DCOSUtils, LCLType, uShowMsg, uElevation, uSuperUser;
|
||||
|
||||
resourcestring
|
||||
rsElevationRequired = 'You need to provide administrator permission';
|
||||
|
|
@ -52,7 +52,7 @@ var
|
|||
begin
|
||||
Text:= rsElevationRequired + LineEnding;
|
||||
Text += Message + LineEnding + FileName;
|
||||
Result:= MessageDlg(mbSysErrorMessage, Text, mtConfirmation, [mbYes, mbNo], 0) = mrYes;
|
||||
Result:= ShowMessageBox(Text, mbSysErrorMessage, MB_OKCANCEL) = IDOK;
|
||||
end;
|
||||
|
||||
function FileOpenUAC(const FileName: String; Mode: LongWord): System.THandle;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ var
|
|||
implementation
|
||||
|
||||
uses
|
||||
uSuperUser, uDebug;
|
||||
uDebug;
|
||||
|
||||
const
|
||||
MasterAddress = 'doublecmd-master-';
|
||||
|
|
@ -269,7 +269,7 @@ begin
|
|||
DCDebug('Start worker server');
|
||||
StartWorkerServer(ParamStr(2));
|
||||
CreateMasterProxy(ParamStr(2));
|
||||
ReadLn;
|
||||
Sleep(MaxInt);
|
||||
Halt;
|
||||
end;
|
||||
end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue