diff options
author | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:55:19 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:55:19 +0200 |
commit | 46fc289a8776ba253e97d01d6948fb1031ea1973 (patch) | |
tree | b16a99c60f21b04c001f29862bf2ee16ae3a0e00 /zen/win_ver.h | |
parent | 6.15 (diff) | |
download | FreeFileSync-46fc289a8776ba253e97d01d6948fb1031ea1973.tar.gz FreeFileSync-46fc289a8776ba253e97d01d6948fb1031ea1973.tar.bz2 FreeFileSync-46fc289a8776ba253e97d01d6948fb1031ea1973.zip |
7.0
Diffstat (limited to 'zen/win_ver.h')
-rw-r--r-- | zen/win_ver.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/zen/win_ver.h b/zen/win_ver.h index 611a27c0..2e8f1ee7 100644 --- a/zen/win_ver.h +++ b/zen/win_ver.h @@ -40,7 +40,7 @@ const OsVersion osVersionWin2000 (5, 0); /* NOTE: there are two basic APIs to check Windows version: (empiric study following) GetVersionEx -> reports version considering compatibility mode (and compatibility setting in app manifest since Windows 8.1) - VerifyVersionInfo -> always reports *real* Windows Version + VerifyVersionInfo -> always reports *real* Windows Version *) Win10 Technical preview caveat: VerifyVersionInfo returns 6.3 unless manifest entry is added!!! */ @@ -118,11 +118,17 @@ bool runningWOW64() //test if process is running under WOW64: http://msdn.micros } +template <bool is64BitBuild> inline +bool running64BitWindowsImpl() { return true; } + +template <> inline +bool running64BitWindowsImpl<false>() { return runningWOW64(); } + inline bool running64BitWindows() //http://blogs.msdn.com/b/oldnewthing/archive/2005/02/01/364563.aspx { static_assert(zen::is32BitBuild || zen::is64BitBuild, ""); - return is64BitBuild || runningWOW64(); //should we bother to give a compile-time result in the first case? + return running64BitWindowsImpl<is64BitBuild>(); } } |