title: LoadLibraryW() failing to load DLL in System32
body: <p>I'm trying to load a DLL that was installed with a printer driver in the C:\Windows\System32\ folder with the following code:</p>
  
  <pre><code>LoadLibraryW(L"C:\\Windows\\System32\\MagAPI.dll");
  </code></pre>
  
  <p><code>GetLastError()</code> is reporting that "The specified module could not be found". If I move the DLL outside of the System32 folder (C:\SomeFolder\MagAPI.dll for example) then it will load fine so it doesn't seem like it's a problem with the DLL itself. Is there some weird Windows security feature that might be blocking my application from loading it? That's the only thing I can think of but I can't find any definitive answers.</p>
  
  <p>Here's the debug output from ShowSnaps, which shows where it's failing:</p>
  
  <pre><code>1a8c:1fd4 @ 19006756 - LdrLoadDll - ENTER: DLL name: C:\Windows\system32\MagAPI.dll DLL path: C:\Windows\system32;C:\Windows\system;C:\Windows;.;&lt;otherstuff&gt;
  1a8c:1fd4 @ 19006756 - LdrpLoadDll - ENTER: DLL name: C:\Windows\system32\MagAPI.dll DLL path: C:\Windows\system32;C:\Windows\system;C:\Windows;.;&lt;otherstuff&gt;
  1a8c:1fd4 @ 19006756 - LdrpLoadDll - INFO: Loading DLL C:\Windows\system32\MagAPI.dll from path C:\Windows\system32;C:\Windows\system;C:\Windows;.;&lt;otherstuff&gt;
  1a8c:1fd4 @ 19006756 - LdrpFindOrMapDll - ENTER: DLL name: C:\Windows\system32\MagAPI.dll DLL path: C:\Windows\system32;C:\Windows\system;C:\Windows;.;&lt;otherstuff&gt;
  1a8c:1fd4 @ 19006756 - LdrpSearchPath - ENTER: DLL name: C:\Windows\system32\MagAPI.dll DLL path: C:\Windows\system32;C:\Windows\system;C:\Windows;.;&lt;otherstuff&gt;
  1a8c:1fd4 @ 19006756 - LdrpResolveFileName - ENTER: DLL name: C:\Windows\system32\MagAPI.dll
  1a8c:1fd4 @ 19006756 - LdrpResolveFileName - RETURN: Status: 0xc0000135
  1a8c:1fd4 @ 19006756 - LdrpSearchPath - RETURN: Status: 0xc0000135
  1a8c:1fd4 @ 19006756 - LdrpFindOrMapDll - RETURN: Status: 0xc0000135
  1a8c:1fd4 @ 19006756 - LdrpLoadDll - RETURN: Status: 0xc0000135
  1a8c:1fd4 @ 19006756 - LdrLoadDll - RETURN: Status: 0xc0000135
  </code></pre>