Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is there no Microsoft.Win64 Namespace?

Tags:

.net

windows

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?

like image 633
rasx Avatar asked Jun 11 '09 17:06

rasx


People also ask

Which is better Win32 or win64?

Running a 64-bit version of Windows means having better security and the ability to use more memory in your system. And, if you have a system that supports it, making the switch from 32-bit to 64-bit Windows is free—even if it does require a bit of work.

Can you run Win32 on win64?

WOW64 is the x86 emulator that allows 32-bit Windows-based applications to run seamlessly on 64-bit Windows. This allows for 32-bit (x86) Windows applications to run seamlessly in 64-bit (x64) Windows, as well as for 32-bit (x86) and 32-bit (ARM) Windows applications to run seamlessly in 64-bit (ARM64) Windows.

What is Win32 namespace?

An abstract base class for displaying common Win32 dialogs. FileDialog. An abstract base class that encapsulates functionality that is common to file dialogs, including OpenFileDialog and SaveFileDialog. FileDialogCustomPlace. Represents an entry in a FileDialog custom place list.


1 Answers

.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.

like image 197
rein Avatar answered Oct 04 '22 00:10

rein