how to find if the machine is 32bit or 64bit

前端 未结 6 476
长情又很酷
长情又很酷 2020-12-13 20:51

Is there anyway from a C prog to find whether the OS is currently running in 32bit or 64bit mode. I am using a simple program as below

int main(void){
     s         


        
6条回答
  •  忘掉有多难
    2020-12-13 21:20

    In addition to compile-time methods, and if you are running on Windows: a call to IsWow64Process ( http://msdn.microsoft.com/en-us/library/ms684139.aspx ) will return true if a process is a 32-bit one running under a 64-bit Windows.

提交回复
热议问题