1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-11-23 21:34:53 +02:00

Fix for crashes on old Delphi versions

This commit is contained in:
Salvador Diaz Fau
2017-02-05 20:56:46 +01:00
parent d3d6c4ca0b
commit c23afaba1b
122 changed files with 875 additions and 118 deletions

View File

@@ -42,10 +42,16 @@ unit uCEFApplication;
{$MINENUMSIZE 4}
{$ENDIF}
{$I cef.inc}
interface
uses
{$IFDEF DELPHI16_UP}
WinApi.Windows,
{$ELSE}
Windows,
{$ENDIF}
uCEFTypes, uCEFInterfaces, uCEFBase;
type
@@ -249,7 +255,11 @@ var
implementation
uses
{$IFDEF DELPHI16_UP}
System.Math, System.IOUtils, System.SysUtils,
{$ELSE}
Math, IOUtils, SysUtils,
{$ENDIF}
uCEFLibFunctions, uCEFMiscFunctions, uCEFSchemeRegistrar, uCEFCommandLine;
const
@@ -575,7 +585,7 @@ var
TempArgs : TCefMainArgs;
begin
TempArgs.instance := HINSTANCE;
Result := cef_execute_process(@TempArgs, CefGetData(FAppIntf), FWindowsSandboxInfo);
Result := cef_execute_process(@TempArgs, FApp.Wrap, FWindowsSandboxInfo);
end;
procedure TCefApplication.InitializeSettings(var aSettings : TCefSettings);
@@ -622,7 +632,7 @@ begin
if FDeleteCookies and (length(FCookies) > 0) then TDirectory.Delete(FCookies, True);
InitializeSettings(TempSettings);
Result := (cef_initialize(@HInstance, @TempSettings, CefGetData(FAppIntf), FWindowsSandboxInfo) <> 0);
Result := (cef_initialize(@HInstance, @TempSettings, FApp.Wrap, FWindowsSandboxInfo) <> 0);
except
on e : exception do
begin