不过,理论上来说,也可以用一个int的大小作为参考,
判断是32位还是64位.
sizeof(int) == 4 //32位系统.
sizeof(int) == 8 //64位系统.

 

也可以使用函数如下:

BOOL IsWow64() 
{ 
    typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL); 
    LPFN_ISWOW64PROCESS fnIsWow64Process; 
    BOOL bIsWow64 = FALSE; 
    fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress( GetModuleHandle("kernel32"),"IsWow64Process"); 
    if (NULL != fnIsWow64Process) 
    { 
        fnIsWow64Process(GetCurrentProcess(),&bIsWow64);
    } 
    return bIsWow64; 
} 

 

相关文章:

  • 2021-09-21
  • 2021-04-30
  • 2022-12-23
  • 2021-06-25
  • 2022-12-23
  • 2022-02-02
  • 2022-12-23
  • 2021-11-12
猜你喜欢
  • 2022-12-23
  • 2021-09-29
  • 2021-12-31
  • 2021-06-21
  • 2021-06-26
  • 2022-12-23
相关资源
相似解决方案