1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2024-11-24 08:02:15 +02:00

Now TCEFApplication sets back the old directory after the DLLs are loaded

This commit is contained in:
Salvador Díaz Fau 2017-10-09 14:59:46 +02:00
parent 4cddbb069b
commit 3c707bb104

View File

@ -858,8 +858,14 @@ begin
end;
function TCefApplication.LoadCEFlibrary : boolean;
var
TempOldDir : string;
begin
if FSetCurrentDir then chdir(GetModulePath);
if FSetCurrentDir then
begin
TempOldDir := GetCurrentDir;
chdir(GetModulePath);
end;
FLibHandle := LoadLibraryEx(PChar(LibCefPath), 0, LOAD_WITH_ALTERED_SEARCH_PATH);
@ -922,6 +928,8 @@ begin
Result := False;
OutputDebugMessage('TCefApplication.LoadCEFlibrary error: Unsupported CEF version !');
end;
if FSetCurrentDir then chdir(TempOldDir);
end;
function TCefApplication.Load_cef_app_capi_h : boolean;