void ClientLibSearchPaths(const std::string&)

This function is currently only implemented in Windows builds of IBPP. It is a no-op on other platforms. It allows the host application to better control which instance of fbclient.dll will get loaded and used by IBPP if there exists the possibility of multiple copies of fbclient.dll on the machine.

By default, IBPP attempts to load the Firebird client library in the following order:

  1. fbembed.dll from the host application executable directory,
  2. fbclient.dll from the host application executable directory,
  3. fbclient.dll from the directory specified by the DefaultInstance registry value of the SOFTWARE\Firebird Project\Firebird Server\Instances registry key,
  4. fbclient.dll without specifying any path, such that the system will choose locations from which to try (usually the system directories)
  5. gds32.dll, for compatibility purposes, without specifying any path, the system will decide from which locations to try (usually the system directories).

By calling ClientLibSearchPaths() before any other IBPP API is called, the host program can submit a list of semi-colon separated paths from which IBPP will try, first, to find and load fbclient.dll.

ClientLibSearchPath("My\\Specific\\Application\\Path;Somewhere\\Else");
...

If no instance of fbclient.dll can be loaded from those additional paths, then IBPP will simply silently default to its above search order.

It should be noted that before attempting loads from locations specified by ClientLibSearchPaths or by the steps 1. to 3. above, IBPP will first add the attempted directory in the front of the PATH value (in the process environment). This step helps the system find the dependencies of fbclient.dll in the same directory as fbclient.dll itself. This means that if you want to load a specific copy of fbclient.dll from some private directory of your application, you should have the binary dependencies of fbclient.dll (the C/C++ runtime Microsoft DDLs) located in that same directory. This is obviously not a requirement, if you know that those runtime libraries are available in the system directories.

reference/clientlibsearchpaths.txt · Last modified: 2006/04/17 20:45 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki