Re: Resource File not loading From DLL
Posted: Mon Mar 04, 2019 8:26 am
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.
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.