We have a Microsoft.Win32 Namespace but is it guaranteed to work in 64-bit Windows environments? Is there an equivalent need to have such definitions for a 64-bit situation?
We have a Microsoft.Win32 Namespace but is it guaranteed to work in 64-bit Windows
Share
.NET applications by default run on the framework which targets the architecture of the OS. So, if you’re running 32 bit Windows, the .NET framework installed on the machine would be the 32 bit framework. All .NET applications running on this framework would then run in “32 bit”.
If you’re running 64 bit Windows then you’re running a 64 bit framework but the IL that’s running on top of the framework doesn’t differ (by default) from that of the 32 bit IL.
So in short: it doesn’t matter if you’re running 32 bit or 64 bit Windows since the .NET framework abstracts that away from the C#/VB code.
The Microsoft.Win32 framework refers to the native APIs inside of Windows. Short of the really bad name that Microsoft has given it, it has nothing to do with 32 bit vs 64 bit Windows.
Incidentally, there are some things you can’t do with the 64 bit version of the framework: for example, there isn’t a JET database driver in the 64 bit framework.