The documentation for LoadLibraryEx() doesn't actually explain what the altered search path is. In the table entry for the LOAD_WITH_ALTERED_SEARCH_PATH
flag it says "see the Remarks section", but in the Remarks section it only says that this flag causes LoadLibraryEx()
to use the altered search path.
But it doesn't explain anywhere what the altered search path actually is.
I finally found the explanation, but it was in a page linked to by the LoadLibraryEx() docs - Dynamic-Link Library Search Order.
Note that the standard search strategy and the alternate search strategy specified by LoadLibraryEx with LOAD_WITH_ALTERED_SEARCH_PATH differ in just one way: The standard search begins in the calling application's directory, and the alternate search begins in the directory of the executable module that LoadLibraryEx is loading.
So standard begins in the *.exe's directory, while the altered begins in the *.dll's directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With