2

I'm using the latest build of DCEF3 and I'm trying to run ChromiumOSR programmatically in a console application. I naively tried this code at first:

Chromium := TChromiumOSR.Create(Self);
Chromium.OnLoadEnd := ChromiumLoadEnd;
Chromium.Load('http://google.com');

But it didn't work and raised an Access Violation. I then found this thread Getting errors creating ChromiumOSR programatically and modified my code accordingly:

Chromium := TChromiumOSR.Create(Self);
Chromium.OnLoadEnd := ChromiumLoadEnd;
Chromium.CreateBrowser;
Chromium.Load('http://google.com');

While I do not get any Access Violations anymore, my code is still not working. In fact, I plugged in a proxy and sniffed the connection: no requests are ever made to http://google.com. I do get the following error in my console application: ERROR - running without renderer sandbox. However, according to my searches on Google, the error can be "ignored" and the code should still work.

Of course, everything works fine if I create TChromiumOSR at design-time in a form application. However, I need to use it programmatically in a console application instead.

Cœur
  • 32,421
  • 21
  • 173
  • 232
Pascal Bergeron
  • 573
  • 2
  • 8
  • 22

0 Answers0