THYBaseModuleManager.LoadModule cannot find dll

Product : Hydra 6
Delphi 7.

We have found a problem with loading a DLL from the following scenario:

Load module L30.DLL by calling LoadModule(‘L30.dll’)
This works fine and the DLL is loaded
Within the applciation TSaveDialog is used to set a directory to save an Excel spreadsheet. This changes the current directory. (GetCurrentDIR shows it has changed)
Close the dll.
Now when L30.DLL is loaded again LoadModule(‘L30.dll’) it fails saying that it cannot find the dll with the error message stating that it is looking in the directory set by TSaveDialog above.

Do we need to give the full path of the DLL or is there an alternitive method to fix it?



You can specify relative path here.
for example, you have TApplication.ExeName. if you put your dlls info DLL folder, you can easily load your dll from DLL\L30.DLL

Ok thanks, that modifications works.

We did not have to give the full path of the DLL when calling LoadModule in Hydra 2 so is that a change for Hydra 6?
I tested the above scenario in using Hydra 2 and the resetting of the current directory in the application did not affect loading subsequent DLL’s.

I presume that when calling LoadManagedModule, I would also need to give the full path of the C# DLL?



You should use that path that works as expected for your application - it can be relative or absolute.