Can an x64 application use x86 assemblies – and vice versa?

No, a 64-bit process can only load 64-bit DLLs and a 32-bit process can only load 32-bit DLLs. What you’re probably thinking of is that a 64-bit operating system can run 32-bit processes.

The main issue with .NET is that – prior to VS2010 – executable projects defaulted to “AnyCPU” which means it would load in the “native” format of the OS it’s running on (so 32-bit for 32-bit versions of Windows and 64-bit for 64-bit versions of Windows). The problem with that is that if you tested your application on 32-bit Windows (say) then it could break if you load 32-bit DLLs and tried to run on 64-bit Windows.

In VS2010, they defaulted all executable projects to be “x86” (that is, 32-bit) by default which (for the most part) mitigates the problem.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)