2018-01-08 16:22:54 +01:00
|
|
|
program SimpleBrowser2;
|
|
|
|
|
2023-11-26 19:28:28 +01:00
|
|
|
{$I ..\..\..\source\cef.inc}
|
2018-01-08 16:22:54 +01:00
|
|
|
|
|
|
|
uses
|
|
|
|
{$IFDEF DELPHI16_UP}
|
|
|
|
Vcl.Forms,
|
|
|
|
{$ELSE}
|
|
|
|
Forms,
|
|
|
|
{$ENDIF }
|
2024-06-17 11:44:07 +02:00
|
|
|
uCEFApplication,
|
2018-01-08 16:22:54 +01:00
|
|
|
uSimpleBrowser2 in 'uSimpleBrowser2.pas' {Form1};
|
|
|
|
|
|
|
|
{$R *.res}
|
|
|
|
|
2024-06-17 11:44:07 +02:00
|
|
|
{$IFDEF WIN32}
|
2023-11-26 19:28:28 +01:00
|
|
|
const
|
|
|
|
IMAGE_FILE_LARGE_ADDRESS_AWARE = $0020;
|
2024-06-17 11:44:07 +02:00
|
|
|
// CEF needs to set the LARGEADDRESSAWARE ($20) flag which allows 32-bit processes to use up to 3GB of RAM.
|
|
|
|
{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}
|
|
|
|
{$ENDIF}
|
2018-01-08 16:22:54 +01:00
|
|
|
|
|
|
|
begin
|
2024-06-17 11:44:07 +02:00
|
|
|
CreateGlobalCEFApp;
|
2018-01-08 16:22:54 +01:00
|
|
|
|
|
|
|
// You *MUST* call GlobalCEFApp.StartMainProcess in a if..then clause
|
|
|
|
// with the Application initialization inside the begin..end.
|
|
|
|
// Read this https://www.briskbard.com/index.php?lang=en&pageid=cef
|
|
|
|
if GlobalCEFApp.StartMainProcess then
|
|
|
|
begin
|
|
|
|
Application.Initialize;
|
|
|
|
{$IFDEF DELPHI11_UP}
|
|
|
|
Application.MainFormOnTaskbar := True;
|
|
|
|
{$ENDIF}
|
|
|
|
Application.CreateForm(TForm1, Form1);
|
|
|
|
Application.Run;
|
|
|
|
end;
|
|
|
|
|
2024-06-17 11:44:07 +02:00
|
|
|
DestroyGlobalCEFApp;
|
2018-01-08 16:22:54 +01:00
|
|
|
end.
|