Hi,
Set a break point in that procedure to see where is the exception exactly.
The TChromium.OnGetResourceHandler event is called in a CEF3 thread and perhaps that's the cause of the exception loading a DLL and reading resources from it.
Try loading the DLL in the main thread and then read the resources from TChromium.OnGetResourceHandler. I haven't checked the Delphi TResourceStream's source code but if it's not thread safe I would also add a critical section or mutex to that event.
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.
Resource File not loading From DLL
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
- salvadordf
- Posts: 4564
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Resource File not loading From DLL
Move the LoadLibrary call to the TForm.OnShow event but leave the rest of the code that reads the resources in the TChromium.OnGetResourceHandler event.
Delphi uses unicode by default. I would suggest you to convert the text resources to UTF8 and add a <meta charset="UTF-8"> tag to the HEAD section in your HTML.
Use these functions :
http://docwiki.embarcadero.com/RADStudi ... n_Routines
Delphi uses unicode by default. I would suggest you to convert the text resources to UTF8 and add a <meta charset="UTF-8"> tag to the HEAD section in your HTML.
Use these functions :
http://docwiki.embarcadero.com/RADStudi ... n_Routines