First of all, please forgive me for not knowing the correct terminology, Iβm sure that there is a very common technical name for which I could just help Google, but I canβt find help if I donβt know the term to begin with.
I am building a modular system in Delphi 7. There are several applications and many DLLs. All applications share these DLLs, and some of the DLLs use other DLLs. The DLL is currently stored in the same place as the application. Instead, I would like to put all these DLLs in a subfolder (elsewhere from the EXE), but of course Delphi will not know how to find them.
Is there a way I can direct my Delphi applications to search in a specific directory for a DLL? It cannot use Contantants, because it will be possible to specify where the DLL is stored.
These DLLs are just a simple set of StdCall functions in each, nothing special.
EDIT:
To explain the reason why I want to save the DLL in my own folder: this system that I create considers these DLLs as add-ons. By default, the system may not even have any add-ons. On the other hand, it will also allow different vendors to create another DLL and include them as add-ons. Then, each application requiring these add-ons will be directed to a folder where they can be found. The application will have its own DLL, which will be in the same directory as the application. But I would like to leave Vendors DLL separately.
As mentioned in the answers below, the best option would be to implement the DLL import method, since A) I can specify the path for each DLL that it imports, B) I can better control the use of each DLL (should I load it or not?) And C) Each DLL can be technically located in separate folders by itself (vendors may want to create their own folder structure). This system is still very mature, but I plan to make it more flexible.
source share