title: SetDllDirectory does not cascade, so dependency DLLs cannot be loaded
body: <p>I execute an exe from a directory, say, "C:/test"<br>
  The DLLs are in the directory "C:/test/dlls" so, in this exe, I call:</p>
  
  <pre><code>SetDllDirectory("C:/test/dlls");
  </code></pre>
  
  <p>Then I call </p>
  
  <pre><code>lib1 = LoadLibrary("lib1.dll)
  </code></pre>
  
  <p>and </p>
  
  <pre><code>ptrType pr = (ptrType) ::GetProcAddress(lib1, "test")
  </code></pre>
  
  <p><code>lib1.dll</code> needs other DLLs that are in the directory "C:/test/dlls", but when I execute <code>pr(...)</code> got from <code>GetProcAddress</code>, I get an error:</p>
  
  <blockquote>
    <p>"The program can't start because lib2.dll is missing from your computer. Try reinstalling the program to fix this problem."</p>
  </blockquote>
  
  <p>If I move <code>lib2.dll</code> to "C:/test", it is found.
  That means that <code>SetDllDirectory()</code> is valid only for the loading of the first DLL.</p>
  
  <p>Does anyone know why and how to fix it?</p>