I'm using sqldb to connect to Firebird from within my DLL. This fails because it cannot find fbclient.dll which is actually present in the same directory as my DLL. GetCurrentDir
returns the path to the Windows system folder. Performing a SetCurrentDir
with the path of the DLL successfully changes the current directory, but still it won't work. What can I do to get sqldb to use fbclient.dll at a location of my choosing?
Asked
Active
Viewed 337 times
3

Thijs van Dien
- 6,516
- 1
- 29
- 48
1 Answers
3
From the wiki page
seems there is no way to explicitly specify the directory from where the Firebird client library could be loaded. So as a workaround you may use the SetDllDirectory
function which will add a directory provided to its only parameter to the search path used to locate DLL libraries for the application. A subsequent call to LoadLibrary
function used to load the Firebird's client library will go through the search list and find it in the location you added by the SetDllDirectory
function call.

TLama
- 75,147
- 17
- 214
- 392