summaryrefslogtreecommitdiff
path: root/alf/alfcompat.h
diff options
context:
space:
mode:
Diffstat (limited to 'alf/alfcompat.h')
-rw-r--r--alf/alfcompat.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/alf/alfcompat.h b/alf/alfcompat.h
index 9c7f3f2..3996309 100644
--- a/alf/alfcompat.h
+++ b/alf/alfcompat.h
@@ -15,6 +15,15 @@ extern IMAGE_DOS_HEADER __ImageBase;
#endif
#define ALF_HINSTANCE ((HINSTANCE)&__ImageBase)
+static inline BOOL ALF_Compat_IsMinWindowsVersion(DWORD major, DWORD minor)
+{
+ DWORD v = GetVersion();
+ DWORD vMajor = LOBYTE(LOWORD(v));
+ DWORD vMinor = HIBYTE(LOWORD(v));
+
+ return vMajor > major || (vMajor == major && vMinor >= minor);
+}
+
typedef LRESULT (CALLBACK *ALF_COMPAT_SUBCLASSPROC)(HWND,UINT,WPARAM,LPARAM,UINT_PTR,DWORD_PTR);
typedef struct {