How can I programmatically determine my processor type?

后端 未结 7 591
清歌不尽
清歌不尽 2021-01-13 01:03

How can I determine programmatically whether my machine is an x86, x64 or an IA64?

7条回答
  •  逝去的感伤
    2021-01-13 01:39

    On Windows Systems you can get the environment variable PROCESSOR_ARCHITECTURE. Here is an MSDN article explaining the values that can be returned.

    PROCESSOR_ARCHITECTURE=AMD64
    PROCESSOR_ARCHITECTURE=IA64
    PROCESSOR_ARCHITECTURE=x86
    

提交回复
热议问题