Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

multiple processes with exename

Post Reply
User avatar
salvadordf
Posts: 4565
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: multiple processes with exename

Post by salvadordf »

Hi,

Yes, you can use a different EXE for the subprocesses.

Read all the code comments in the SubProcess demo for more details.
User avatar
salvadordf
Posts: 4565
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: multiple processes with exename

Post by salvadordf »

The SubProcess project is extremely short in most cases. It only has 2 files : 1 DPR and 1 DPROJ

Without code comments, the minimum SubProcess.dpr file would be this :

Code: Select all

program SubProcess;

uses
  WinApi.Windows, uCEFApplication;

{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}

begin
  GlobalCEFApp                  := TCefApplication.Create;
  GlobalCEFApp.DisableFeatures  := 'NetworkService,OutOfBlinkCors';
  GlobalCEFApp.StartSubProcess;
  DestroyGlobalCEFApp;
end.
You would only need to set the GlobalCEFApp properties and the "GlobalCEFApp.DisableFeatures" line will probably disappear in the next Chromium update.

This is the preferred solution for projects that need to add a CEF browser and they want to do very few modifications to the main DPR file, or they have a complex initialization in the main project and adding CEF makes it even harder to maintain.
Post Reply