20.1.5 How Windows Locates Dynamic-Link Libraries

Windows locates a dynamic-link library by searching the same directories it searches to find an application module. For Windows to the find the library, it must be in one of the following directories, which Windows searches in the order listed:

1.The current directory.

2.The Windows directory (the directory containing WIN.COM); use the GetWindowsDirectory function to retrieve the path of this directory.

3.The Windows system directory (the directory containing such system files as GDI.EXE); use the GetSystemDirectory function to retrieve the path of this directory.

4.Any of the directories listed in the PATH environment variable.

5.Any directory in the list of directories mapped in a network.

Implicitly loaded libraries must be named with the .DLL extension.