Chromium Browser in Exe and DLL
Posted: Fri Jan 17, 2020 1:22 pm
Hi,
I have an application that uses CEF4Delphi. A part of this application is a DLL containing some additional functions and Forms. The DLL is written in Delphi, too. The DLL interface is and must remain compatible with other applications written in other programming languages. The Exe contains some Form with Chromium browsers. This works fine.
Now, some of the forms in this DLL should also be extended with a chromium browser control. I don't know, how to get this work. I cannot create another instance of TCefApplication in the DLL, because it must be unique. If I try so, I get an exception (libcef.dll cannot be opened. The file is already in use by another process). I cannot use the instance of the TCefApplication from the Exe, because I cannot share the global TCefApplication instance between Exe and DLL (and even if I do so, I get lots of access violations).
Is there any way to achieve what I'm trying to do? Or is it impossible? The only workaround I see so far (but not yet tested), is to copy all the chromium libraries and additional files to a second folder and initialize another TCefApplication in the DLL. But having 150 MB of binaries twice on the hard disk, is not my favourite solution.
Thanks in advance
Matthias
I have an application that uses CEF4Delphi. A part of this application is a DLL containing some additional functions and Forms. The DLL is written in Delphi, too. The DLL interface is and must remain compatible with other applications written in other programming languages. The Exe contains some Form with Chromium browsers. This works fine.
Now, some of the forms in this DLL should also be extended with a chromium browser control. I don't know, how to get this work. I cannot create another instance of TCefApplication in the DLL, because it must be unique. If I try so, I get an exception (libcef.dll cannot be opened. The file is already in use by another process). I cannot use the instance of the TCefApplication from the Exe, because I cannot share the global TCefApplication instance between Exe and DLL (and even if I do so, I get lots of access violations).
Is there any way to achieve what I'm trying to do? Or is it impossible? The only workaround I see so far (but not yet tested), is to copy all the chromium libraries and additional files to a second folder and initialize another TCefApplication in the DLL. But having 150 MB of binaries twice on the hard disk, is not my favourite solution.
Thanks in advance
Matthias