0

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?

zen-cat
  • 425
  • 2
  • 9

1 Answers1

1

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.

selbie
  • 100,020
  • 15
  • 103
  • 173