Hi,
Yes, you can use a different EXE for the subprocesses.
Read all the code comments in the SubProcess demo for more details.
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.
multiple processes with exename
- salvadordf
- Posts: 4565
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
- salvadordf
- Posts: 4565
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: multiple processes with exename
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 :
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.
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.
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.