32/64 Bit Question

Posted by user48408 on Stack Overflow See other posts from Stack Overflow or by user48408
Published on 2010-05-19T15:16:01Z Indexed on 2010/05/19 15:50 UTC
Read the original article Hit count: 170

Filed under:
|
|
|

Here's my question. What is the best way to determine what bit architecture your app is running on?

What I am looking to do: On a 64 bit server I want my app to read 64 bit datasources (stored in reg key Software\Wow6432Node\ODBC\ODBC.INI\ODBC Data Sources) and if its 32 bit I want to read 32 bit datasources, (i.e. Read from Software\ODBC\ODBC.INI\ODBC Data Sources).

I might be missing the point, but I don't want to care what mode my app is running in. I simply want to know if the OS is 32 or 64 bit.

[System.Environment.OSVersion.Platform doesn't seem to be cutting it for me. Its returning Win32NT on my local xp machine and on a win2k8 64 bit server (even when all my projects are set to target 'any cpu')]

© Stack Overflow or respective owner

Related posts about 32bit-64bit

Related posts about os