title: Which DLL is [DllImport] loading?
body: <p>I'm using the <code>[DllImport]</code> attribute to import a native DLL into my application but the DLL it's loading isn't in the local bin folder. It's being loaded from elsewhere on the system, but I can't work out where. </p>
  
  <p>It works on my dev machine but not on a clean one.</p>
  
  <p>I've enabled Fusion logging and that only shows me managed assemblies.</p>
  
  <p>I've dumped the process using Sysinternals Process Explorer and that's telling me it's in <code>C:\Windows\System32</code> but I can't see the file there in Windows Explorer.</p>
  
  <p>It might be worth noting that I'm running 64 bit Windows 7 but the DLL only supports x86 so I've had to force my app do be x86. Is there some sort of redirect that changes where x86 files are loaded from?</p>
  
  <p>The DllImport is a custom Silicon Labs USB driver. [DllImport("SiUSBXp.dll")]</p>
  
  <p>I've also used the command prompt to do a <code>dir si*</code> in the System32 folder and the file isn't there.</p>