Top.Mail.Ru
Мастера DELPHI, Delphi programming community Титульная страница Поиск, карта сайта Написать письмо 
| Новости | Поиск | FAQ | Статьи | Книги | Новости VCL |
| Форумы ЧАТ | Орешник | KOL и MCK |
Форумы -» Основная («Начинающим»)/ Базы / WinAPI / Компоненты / Сети / Media / Игры / Corba и COM / KOL / FreePascal / .Net / Прочее / RSDN.ORG

« предыдущая ветвь | форум | следующая ветвь »

Порядок поиска DLL из приложения


Ega23 ©   (2005-02-10 10:48:00) 

Если путь к dll не указан явным образом, то каков порядок поиска DLL при динамической загрузке?
Директория программы + всё, что в PATH указано?


Ega23   (2005-02-10 12:22:00) [1]

2 VMcL ©   (10.02.05 12:11) [4]

Спасибо, я уже сам нашёл...  :о)

З.Ы.
Ты почему до сих пор трезвый???  :о)


Reindeer Moss Eater   (2005-02-10 12:19:00) [2]

Есть еще место.
HKLM\Software\Microsoft\Windows\CurrentVersion\AppPath


VMcL   (2005-02-10 12:16:00) [3]

P.S.
Для Windows XP SP1 и Windows Server 2003 есть ещё SetDllDirectory().


VMcL   (2005-02-10 12:11:00) [4]

>> Ega23 ©   (10.02.05 10:48)

LoadLibrary + F1:

the function searches for the file in the following sequence:

The directory from which the application loaded.
The current directory.
The system directory. Use the GetSystemDirectory function to get the path of this directory.
The 16-bit system directory. There is no function that obtains the path of this directory, but it is searched.
Windows Me/98/95:  This directory does not exist.
The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
The directories that are listed in the PATH environment variable.

Windows Server 2003, Windows XP SP1:  The default value of HKLM\System\CurrentControlSet\Control\Session Manager\SafeDllSearchMode is 1 (current directory is searched after the system and Windows directories).
Windows XP:  If HKLM\System\CurrentControlSet\Control\Session Manager\SafeDllSearchMode is 1, the current directory is searched after the system and Windows directories, but before the directories in the PATH environment variable. The default value is 0 (current directory is searched before the system and Windows directories).


Ega23   (2005-02-10 11:26:00) [5]

Thanks!


Reindeer Moss Eater   (2005-02-10 11:25:00) [6]

Папка из которой запущено приложение.
Текущая папка процесса.
Каталог Windows
и так далее до папок перечисленных в PATH


TUser   (2005-02-10 11:10:00) [7]

Сначала в своей папке
Потом - в папке WINNT
Потом - в WINNT\System32


Наверх

Титульная страница Поиск, карта сайта Написать письмо