Improved loadlibrary error info in Lazarus

This commit is contained in:
Salvador Díaz Fau 2024-09-12 14:43:28 +02:00
parent aba0ec399c
commit 66279dde42
2 changed files with 10 additions and 5 deletions

View File

@ -3806,9 +3806,7 @@ end;
function TCefApplicationCore.LoadCEFlibrary : boolean;
var
TempOldDir : string;
{$IFDEF MSWINDOWS}
TempError : DWORD;
{$ENDIF}
TempError : {$IFDEF MSWINDOWS}DWORD;{$ELSE}Integer;{$ENDIF}
begin
Result := False;
@ -3847,7 +3845,14 @@ begin
'Error code : 0x' + inttohex(TempError, 8) + CRLF +
SysErrorMessage(TempError);
{$ELSE}
FLastErrorMessage := 'Error loading ' + LIBCEF_DLL;
{$IFDEF FPC}
TempError := GetLastOSError;
FLastErrorMessage := 'Error loading ' + LIBCEF_DLL + CRLF + CRLF +
'Error code : 0x' + inttohex(TempError, 8) + CRLF +
UTF8Decode(GetLoadErrorStr);
{$ELSE}
FLastErrorMessage := 'Error loading ' + LIBCEF_DLL;
{$ENDIF}
{$ENDIF}
ShowErrorMessageDlg(FLastErrorMessage);

View File

@ -2,7 +2,7 @@
"UpdateLazPackages" : [
{
"ForceNotify" : true,
"InternalVersion" : 655,
"InternalVersion" : 656,
"Name" : "cef4delphi_lazarus.lpk",
"Version" : "128.4.9"
}