Win32: Improvements on checking for Windows version and FS features
[wimlib] / src / win32_common.h
index ffbc59a5766d45bb200663631d31c1fa441e6f62..9a61dab1aae0f91704a4e4bca0dde708b8a4274e 100644 (file)
@@ -44,4 +44,18 @@ extern HANDLE (WINAPI *win32func_FindFirstStreamW)(LPCWSTR lpFileName,
 extern BOOL (WINAPI *win32func_FindNextStreamW)(HANDLE hFindStream,
                                                LPVOID lpFindStreamData);
 
+extern bool
+windows_version_is_at_least(unsigned major, unsigned minor);
+
+#define running_on_windows_xp_or_later() \
+                       windows_version_is_at_least(5, 1)
+
+#define running_on_windows_vista_or_later() \
+                       windows_version_is_at_least(6, 0)
+
+#define running_on_windows_7_or_later() \
+                       windows_version_is_at_least(6, 1)
+
+
+
 #endif /* _WIMLIB_WIN32_COMMON_H */