summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/source/win32/shlxthandler/propsheets/propsheets.cxx5
-rw-r--r--shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx5
-rw-r--r--shell/source/win32/shlxthandler/util/utilities.cxx5
3 files changed, 15 insertions, 0 deletions
diff --git a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx
index 936b3dba32f2..824b7fdd16f5 100644
--- a/shell/source/win32/shlxthandler/propsheets/propsheets.cxx
+++ b/shell/source/win32/shlxthandler/propsheets/propsheets.cxx
@@ -172,6 +172,10 @@ HRESULT STDMETHODCALLTYPE CPropertySheet::Initialize(
HRESULT STDMETHODCALLTYPE CPropertySheet::AddPages(LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam)
{
+// the Win32 SDK 8.1 deprecates GetVersionEx()
+#ifdef _WIN32_WINNT_WINBLUE
+ bool bIsVistaOrLater = IsWindowsVistaOrGreater() ? true : false;
+#else
// Get OS version (we don't need the summary page on Windows Vista or later)
OSVERSIONINFO sInfoOS;
@@ -179,6 +183,7 @@ HRESULT STDMETHODCALLTYPE CPropertySheet::AddPages(LPFNADDPROPSHEETPAGE lpfnAddP
sInfoOS.dwOSVersionInfoSize = sizeof( OSVERSIONINFO );
GetVersionEx( &sInfoOS );
bool bIsVistaOrLater = (sInfoOS.dwMajorVersion >= 6);
+#endif
std::wstring proppage_header;
diff --git a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
index 8c62836fbadb..5d57a4fbac53 100644
--- a/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
+++ b/shell/source/win32/shlxthandler/thumbviewer/thumbviewer.cxx
@@ -68,6 +68,10 @@ namespace internal
bool IsWindowsXP()
{
+// the Win32 SDK 8.1 deprecates GetVersionEx()
+#ifdef _WIN32_WINNT_WINBLUE
+ return IsWindowsXPOrGreater() ? true : false;
+#else
OSVERSIONINFO osvi;
ZeroMemory(&osvi, sizeof(osvi));
osvi.dwOSVersionInfoSize = sizeof(osvi);
@@ -75,6 +79,7 @@ namespace internal
return ((osvi.dwPlatformId == VER_PLATFORM_WIN32_NT) &&
((osvi.dwMajorVersion >= 5) && (osvi.dwMinorVersion >= 1)));
+#endif
}
/* Calculate where to position the signet image.
diff --git a/shell/source/win32/shlxthandler/util/utilities.cxx b/shell/source/win32/shlxthandler/util/utilities.cxx
index 1f2423dbd40a..f97013ef6d38 100644
--- a/shell/source/win32/shlxthandler/util/utilities.cxx
+++ b/shell/source/win32/shlxthandler/util/utilities.cxx
@@ -104,6 +104,10 @@ std::wstring GetResString(int ResId)
*/
bool is_windows_xp_or_above()
{
+// the Win32 SDK 8.1 deprecates GetVersionEx()
+#ifdef _WIN32_WINNT_WINBLUE
+ return IsWindowsXPOrGreater() ? true : false;
+#else
OSVERSIONINFO osvi;
ZeroMemory(&osvi, sizeof(osvi));
osvi.dwOSVersionInfoSize = sizeof(osvi);
@@ -116,6 +120,7 @@ bool is_windows_xp_or_above()
return true;
}
return false;
+#endif
}