V
void.no.spam.com@gmail.com
In recent versions of Windows, the following order is used to search
for a DLL that an application wants to load:
1) the directory from which the application loaded
2) the system directory
3) the 16-bit system directory
4) the Windows directory
5) the current directory
6) the directories that are listed in the PATH environment variable
Prior to Windows XP SP2, the current directory was searched second
(before the system directory), but that was changed for security
purposes.
But can someone explain to me how the current directory could ever
contain DLLs that the program needs, if the current directory is
different from the other directories listed above? Seems like if a
program needs DLLs, then they will be located in either the
application directory (or one of its subdirectories) or in the system
directories. Why would the current directory need to be searched at
all?
for a DLL that an application wants to load:
1) the directory from which the application loaded
2) the system directory
3) the 16-bit system directory
4) the Windows directory
5) the current directory
6) the directories that are listed in the PATH environment variable
Prior to Windows XP SP2, the current directory was searched second
(before the system directory), but that was changed for security
purposes.
But can someone explain to me how the current directory could ever
contain DLLs that the program needs, if the current directory is
different from the other directories listed above? Seems like if a
program needs DLLs, then they will be located in either the
application directory (or one of its subdirectories) or in the system
directories. Why would the current directory need to be searched at
all?