Commit 244462cc authored by Vincent Béron's avatar Vincent Béron Committed by Alexandre Julliard

Correct implementation of VerSetConditionMask.

parent 23d3ef19
...@@ -744,6 +744,27 @@ NTSTATUS WINAPI NtAllocateLocallyUniqueId(PLUID Luid) ...@@ -744,6 +744,27 @@ NTSTATUS WINAPI NtAllocateLocallyUniqueId(PLUID Luid)
ULONGLONG WINAPI VerSetConditionMask( ULONGLONG dwlConditionMask, DWORD dwTypeBitMask, ULONGLONG WINAPI VerSetConditionMask( ULONGLONG dwlConditionMask, DWORD dwTypeBitMask,
BYTE dwConditionMask) BYTE dwConditionMask)
{ {
FIXME("%llx %lu %u\n", dwlConditionMask, dwTypeBitMask, dwConditionMask); if(dwTypeBitMask == 0)
return dwlConditionMask;
dwConditionMask &= 0x07;
if(dwConditionMask == 0)
return dwlConditionMask;
if(dwTypeBitMask & VER_PRODUCT_TYPE)
dwlConditionMask |= dwConditionMask << 7*3;
else if (dwTypeBitMask & VER_SUITENAME)
dwlConditionMask |= dwConditionMask << 6*3;
else if (dwTypeBitMask & VER_SERVICEPACKMAJOR)
dwlConditionMask |= dwConditionMask << 5*3;
else if (dwTypeBitMask & VER_SERVICEPACKMINOR)
dwlConditionMask |= dwConditionMask << 4*3;
else if (dwTypeBitMask & VER_PLATFORMID)
dwlConditionMask |= dwConditionMask << 3*3;
else if (dwTypeBitMask & VER_BUILDNUMBER)
dwlConditionMask |= dwConditionMask << 2*3;
else if (dwTypeBitMask & VER_MAJORVERSION)
dwlConditionMask |= dwConditionMask << 1*3;
else if (dwTypeBitMask & VER_MINORVERSION)
dwlConditionMask |= dwConditionMask << 0*3;
return dwlConditionMask; return dwlConditionMask;
} }
...@@ -838,9 +838,77 @@ DECL_WINELIB_TYPE_AW(OSVERSIONINFO) ...@@ -838,9 +838,77 @@ DECL_WINELIB_TYPE_AW(OSVERSIONINFO)
DECL_WINELIB_TYPE_AW(POSVERSIONINFO) DECL_WINELIB_TYPE_AW(POSVERSIONINFO)
DECL_WINELIB_TYPE_AW(LPOSVERSIONINFO) DECL_WINELIB_TYPE_AW(LPOSVERSIONINFO)
#define VER_PLATFORM_WIN32s 0 typedef struct {
#define VER_PLATFORM_WIN32_WINDOWS 1 DWORD dwOSVersionInfoSize;
#define VER_PLATFORM_WIN32_NT 2 DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
CHAR szCSDVersion[128];
WORD wServicePackMajor;
WORD wServicePackMinor;
WORD wSuiteMask;
BYTE wProductType;
BYTE wReserved;
} OSVERSIONINFOEXA, *POSVERSIONINFOEXA, *LPOSVERSIONINFOEXA;
typedef struct {
DWORD dwOSVersionInfoSize;
DWORD dwMajorVersion;
DWORD dwMinorVersion;
DWORD dwBuildNumber;
DWORD dwPlatformId;
WCHAR szCSDVersion[128];
WORD wServicePackMajor;
WORD wServicePackMinor;
WORD wSuiteMask;
BYTE wProductType;
BYTE wReserved;
} OSVERSIONINFOEXW, *POSVERSIONINFOEXW, *LPOSVERSIONINFOEXW;
DECL_WINELIB_TYPE_AW(OSVERSIONINFOEX)
DECL_WINELIB_TYPE_AW(POSVERSIONINFOEX)
DECL_WINELIB_TYPE_AW(LPOSVERSIONINFOEX)
ULONGLONG WINAPI VerSetConditionMask(ULONGLONG,DWORD,BYTE);
#define VER_SET_CONDITION(_m_,_t_,_c_) ((_m_)=VerSetConditionMask((_m_),(_t_),(_c_)))
#define VER_PLATFORM_WIN32s 0
#define VER_PLATFORM_WIN32_WINDOWS 1
#define VER_PLATFORM_WIN32_NT 2
#define VER_MINORVERSION 0x00000001
#define VER_MAJORVERSION 0x00000002
#define VER_BUILDNUMBER 0x00000004
#define VER_PLATFORMID 0x00000008
#define VER_SERVICEPACKMINOR 0x00000010
#define VER_SERVICEPACKMAJOR 0x00000020
#define VER_SUITENAME 0x00000040
#define VER_PRODUCT_TYPE 0x00000080
#define VER_NT_WORKSTATION 1
#define VER_NT_DOMAIN_CONTROLLER 2
#define VER_NT_SERVER 3
#define VER_SUITE_SMALLBUSINESS 0x00000001
#define VER_SUITE_ENTERPRISE 0x00000002
#define VER_SUITE_BACKOFFICE 0x00000004
#define VER_SUITE_COMMUNICATIONS 0x00000008
#define VER_SUITE_TERMINAL 0x00000010
#define VER_SUITE_SMALLBUSINESS_RESTRICTED 0x00000020
#define VER_SUITE_EMBEDDEDNT 0x00000040
#define VER_SUITE_DATACENTER 0x00000080
#define VER_SUITE_SINGLEUSERTS 0x00000100
#define VER_SUITE_PERSONAL 0x00000200
#define VER_EQUAL 1
#define VER_GREATER 2
#define VER_GREATER_EQUAL 3
#define VER_LESS 4
#define VER_LESS_EQUAL 5
#define VER_AND 6
#define VER_OR 7
typedef struct tagCOMSTAT typedef struct tagCOMSTAT
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment