Пытаюсь использовать стороннюю C#-библиотеку (gtk-sharp), которая в свою очередь юзает 32-х разрядные native dll.
Папка с native dll-ками прописана в PATH.
Так вот, в рантайме вылетает исключение "Не удается загрузить DLL" ругающееся на native dll-ки.
Компилирую как x86. Если все dll-ки скинуть в bin каталог, то ошибки не происходит.
wtf???
p.s. Dependency Walker ругается на GPSVC.DLL и IESHIMS.DLL.
Здравствуйте, Аноним, Вы писали:
А>В 64-х, если запускать х86 приложения, то они запускается из под особой подсистемы, где переменные, в том числе и PATH, имеют своё собственное значение. Подробнее в MSDN.
MSDN местами читал =)
Но проблему забороть пока не удалось. Итак — приложение пускается под WOW64, происходит перенаправление файловой системы и реестра.
Порядок загрузки на Vista должен быть таким (или нет?!).
отсюда
If SafeDllSearchMode is enabled, the search order is as follows:
1 The directory from which the application loaded.
2 The system directory. Use the GetSystemDirectory function to get the path of this directory.
3 The 16-bit system directory. There is no function that obtains the path of this directory, but it is searched.
4 The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
5 The current directory.
6 The directories that are listed in the PATH environment variable. Note that this does not include the per-application path specified by the App Paths registry key. The App Paths key is not used when computing the DLL search path.
Поскольку dll-ки загружаются, если расположены в current directory, то вероятно, что-то не так с PATH.
Только что?