Question

I'm writing an ISAPI extension. The main DLL depends on several other DLLs. I put all of them on the same path and it works. The question is: why?

AFAIK Windows should look up for libraries in the .exe folder (which is something like C:\Windows\SysWOW64\inetsrv for w3wp.exe) and at the current path (which is the same) but definitely not in the directory where ISAPI extension DLL itself placed. So it's bothering me that I don't understand why something works almost as if it weren't work :) What IIS does? Modifies PATH, calls SetDllDirectory() or something else?

Était-ce utile?

La solution

It likely depends on how IIS calls LoadLibrary(Ex) to load your ISAPI DLL.

It's likely they are calling LoadLibraryEx with the LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR flag or similar flag.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top