以下是Raymond Chen在
http://blogs.msdn.com/oldnewthing/archive/2005/02/01/364563.aspx博客中建议的内容:
原文链接:https://www.f2er.com/windows/364958.htmlBOOL Is64BitWindows() { #if defined(_WIN64) return TRUE; // 64-bit programs run only on Win64 #elif defined(_WIN32) // 32-bit programs run on both 32-bit and 64-bit Windows // so must sniff BOOL f64 = FALSE; return IsWow64Process(GetCurrentProcess(),&f64) && f64; #else return FALSE; // Win64 does not support Win16 #endif }