[Mono-list] Can You Programmatically Determining Architecture (x86, x64, IA64)?
Alex
xtzgzorex at gmail.com
Fri Sep 30 04:05:40 EDT 2011
Hi,
Nope, there's no good way to do it, unfortunately. What I did was use
PROCESSOR_ARCHITECTURE on Windows and uname() on other systems, but be
prepared to have a huge ugly switch with weird values because the
output of that function is not well-specified.
Regards,
Alex
On Fri, Sep 30, 2011 at 1:30 AM, Rodney Foley <rsfoley at gnomesoft.com> wrote:
> Is there a cross-platform pure C# (Mono/.Net) method for determining if your
> code is running on an IA64 system?
>
> Calling Environment.Is64BitOperatingSystem property will tell me 32bit pr
> 64bit. However that doesn't tell me if it is Itanium. Calling
> Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE"). However that
> is not cross-platform unless Mono/.Net add it if it doesn't exist already.
>
> Any help in this matter is greatly appreciated, and if there is no pure C#
> way to do this and there is a P/Invoke way to do it by OS (Red Hat, Ubuntu,
> Windows, HPUX, etc) that would be appreciated as well.
>
> --
> View this message in context: http://mono.1490590.n4.nabble.com/Can-You-Programmatically-Determining-Architecture-x86-x64-IA64-tp3858106p3858106.html
> Sent from the Mono - General mailing list archive at Nabble.com.
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
More information about the Mono-list
mailing list