Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I tell what bitness my code is running in?

2 views
Skip to first unread message

David Thielen

unread,
Jan 23, 2010, 8:37:38 PM1/23/10
to
I want to tell if we are running in 32-bit or 64-bit mode.

thanks - dave

david@at-at-at@windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm

Jialiang Ge [MSFT]

unread,
Jan 24, 2010, 10:47:54 PM1/24/10
to
Hello Dave

In .NET, you can check IntPtr.Size == 8 to tell whether the process is
running in 32bit mode or 64bit mode.

It is also frequently asked how to programmatically know the OS bitness of
the running machine in C#. I summarized the solution in the All-In-One Code
Framework (http://cfx.codeplex.com) sample CSCheckOSBitness:
http://cfx.codeplex.com/SourceControl/changeset/view/39074#842775


Regards,
Jialiang Ge
Microsoft Online Community Support

=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd...@microsoft.com.

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================


0 new messages