Microsoft has [a long article][1] explaining these details and more. The rules are now complicated enough that it isn't worth trying to memorize them all, for most developers. [1]: https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order