The Search Path Used by Windows to Locate a DLL
Visual Studio 6.0
http://msdn.microsoft.com/en-us/library/aa240996(v=vs.60).aspx | Overview | How Do I | FAQ | Details | Sample
With both implicit and explicit linking, Windows first searches the set of pre-installed DLLs such as the performance library (KERNEL32.DLL) and the security library (USER32.DLL). Windows then searches for the DLLs in the following sequence:
-
The directory where the executable module for the current process is located.
-
The current directory.
-
The Windows system directory. The GetSystemDirectory function retrieves the path of this directory.
-
The Windows directory. The GetWindowsDirectory function retrieves the path of this directory.
-
The directories listed in the PATH environment variable.
Note that the LIBPATH environment variable is not used.