Ver Mensaje Individual
  #5  
Antiguo 25-08-2020
blancasma blancasma is offline
Registrado
 
Registrado: ago 2020
Posts: 4
Reputación: 0
blancasma Va por buen camino
Lo sabía.. es un bug de la VCL....

Reporte el caso a Embarcadero y tenía razón... es un bug de VCL, pongo la contestación del soporte...

Cita:
This is a bug VCL, you can report bug on the Quality Portal, the bug will be public and you will receive notifications when it is fixed. I can report the issue internally but then you will not get any notifications.

You can resolve the problem in two ways..

1) delay load the DLL, so in the EXE project
Project | Options | Building | C++ Linker | Advanced | Delay load DLLs
2) add the name of the DLL in your example it is "Project1.dll" (without the quotes)
3) use a package rather than a DLL, a package is a DLL but with more type information. This is the best solution as it is not a good idea to have DLLs and EXEs that have packages, the reason is that DLLs will initialise unit differently to packages, and this can cause problems in some cases where a framework depends on a specific initialisation order.

And your application will run as expected.

The reason this problem is occurring is that a class constructor (for TDBNavigator) tries to load some bitmaps using COM based APIs this means it needs to have CoInitialize called BEFORE they can be used. Because the class constructors are called very early on in the DLL initialising, before any other code can be called at DLL load time, therefore CoInitialize cannot be called either by the EXE or any of the packages used, and hence the failure. So the VCL will have to be fixed.
Aplique lo que comenta y funciono, lo que sigue es reportarlo para su corrección y ver en que parche se libera.


Saludos
Responder Con Cita