判断操作系统是不是64位
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL); LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress(GetModuleHandle("kernel32"), "IsWow64Process"); CString GetSystemIsWow64() { BOOL bIsWow64 = FALSE; CString str64; if (NULL != fnIsWow64Process) { if (!fnIsWow64Process(GetCurrentProcess(),&bIsWow64)) { MessageBox(0,"Handle Error!",0,0); } } if (bIsWow64 == true) { str64 = "64位"; } else { str64 = "32位"; } return str64; } |
转载请注明:exchen's blog » IsWow64Process 判断操作系统位数