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.

How do I use CEF Components in a DLL form (Delphi)

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

Re: How do I use CEF Components in a DLL form (Delphi)

Post by salvadordf »

Hi,

I've never tried to put all CEF4Delphi code inside a DLL but I can suggest you this :
  • CEF4Delphi can only be initialized and finalized outside the DLL's initialization and finalization sections. Create a couple of custom functions to initialize and finalize CEF4Delphi manually.
  • CEF3 can only be initialized once per process. This means that you can only call CEF4Delphi.StartMainProcess once.
  • You must use a different EXE for the subprocesses.
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How do I use CEF Components in a DLL form (Delphi)

Post by salvadordf »

Please, download CEF4Delphi again.

There's a new demo called DLLBrowser that includes CEF4Delphi in a DLL and shows a simple browser in a child form. Please, read the code comments.
User avatar
salvadordf
Posts: 4564
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How do I use CEF Components in a DLL form (Delphi)

Post by salvadordf »

HPW wrote: Sat Jul 14, 2018 5:21 amWill this (DllBrowser) work also in OldCef4Delphi?
Yes, it works with a small modification.

I just uploaded it to GitHub.
Post Reply