I pulled cef_binary_83.3.12+g0889ff0+chromium-83.0.4103.97_windows64.tar from the download site and I am on Win10. What would not match? I thought I found some code that did a hash test to verify the version. Could be I am thinking of some other system we use.
When I start up our app and one of our commands wants to show the user a web page (we are not a browser app) in a dialog, I start up cef. My cef app is very small:
class CefMfcCefApp : public CefApp, CefBrowserProcessHandler {
public:
CefMfcCefApp()
{
}
CefRefPtr<CefBrowserProcessHandler> GetBrowserProcessHandler()
{
return this;
}
void OnBeforeChildProcessLaunch( CefRefPtr<CefCommandLine> command_line )
{
TRACE(L"CEF OnBeforeChildProcessLaunch");
}
CefRefPtr<CefBrowserProcessHandler> m_pProcessHandler = nullptr;
private:
// Include the default reference counting implementation.
IMPLEMENT_REFCOUNTING(CefMfcCefApp);
};
When I break in OnBeforeChildProcessLaunch, VS debugger Locals window shows me the command_line is null:
+ command_line {ptr_=0x0000000000000000 <NULL> } scoped_refptr<CefCommandLine>
Is this an issue with how I start CEF up? Perhaps how I do that is wrong. I ended up doing this:
m_CEF_app = new CefMfcCefApp;
CefMainArgs mainargs(hInstance);
const auto exit_code = CefExecuteProcess(mainargs, m_CEF_app.get(), sandbox_info);
if(exit_code >= 0)
return false;
which I think is totally odd since hInstance is that of my application, and it has nothing to do with CEF itself - the command line passed to our application has nothing related to cef in it. I already worry that cef will see some switch, like /automation /assembly or other switches we use and think it is meant for it. I can go back and take that hInstance out as at this point, I don't recall if I could create the CefMainArgs without using my app's hInstance.
Did I make the wrong choice trying to use cef? As I noted, I am not a browser app. I am just looking for a replacement of the Microsoft Web Browser control which is a COM object (and we being a COM application) which we use to host some of our UI (html pages) and some company web sites via the DOM and events the MS WBC provides.
I did find this link:
https://gitlab.collabora.com/web/cef/co ... 8817d52532But it uses include files not in the cef download I pulled and appears to be internal to cef or is out of date. Right now, I want to pass the subprocess information about the DPI setting we use as the call to set the CefenableHighDPISupport routine I found and called when my subprocess fires up is not usable as it doesn't match the DPI settings we can run with. That causes an issue I have seen posted elsewhere where moving our app from one monitor to another causes cef to render a "ghost" image of the web page in our window giving a picture in picture effect. So I want to pass which setting we use to the subprocess so both processes match wrt the dpi setting. Besides, that arg, over time I might need other args passed so I thought I just sync the two settings using the command line.
Update: I created the cef args without our hInstance with no issue showing up. But, the command line pointer is still null.
I can start over. Kindly point me to the latest cef binaries so I make sure I pull the correct version and point me to the cef-project that matches it so I can build the libcef_dll_wrapper.lib as I have to build it with /MD and /MDd. The cef subprocess that gets fired up is passed a command line so something appears to be out of sync. I thought I followed the instructions carefully on pulling cef-project and converting it to a Visual Studio 2017 and a 2019 project and pulled the bitbucket binaries, of which there were two ( the second being a "minimal" download). So I have binaries that I don't build and a "cef-project" that is independent of the cef binary downloads that I can build and do have to build so I can link our app with the wrapper lib.
Here is what led me astray?
https://bitbucket.org/chromiumembedded/ ... -arguments