Sets the bits of a 64-bit value to indicate the comparison operator to use for a specified operating system version attribute. This macro is used to build the dwlConditionMask parameter of the
VerifyVersionInfo function.
Syntax
ULONGLONG VER_SET_CONDITION(
ULONGLONG dwlConditionMask,
DWORD dwTypeBitMask,
BYTE dwConditionMask
);
Parameters
- dwlConditionMask
-
A variable to be passed as the dwlConditionMask parameter of the
VerifyVersionInfo function. The macro stores the comparison information in the bits of this variable.
Before the first call to
VER_SET_CONDITION, initialize this variable to zero. For subsequent calls to
VER_SET_CONDITION, pass in the variable used in the previous call.
- dwTypeBitMask
-
A mask that indicates the member of the
OSVERSIONINFOEX structure whose comparison type is being set. This value corresponds to one of the bits specified in the dwTypeMask parameter for the
VerifyVersionInfo function. This parameter can be one of the following values.
| Value | Meaning |
- VER_BUILDNUMBER
- 0x0000004
| dwBuildNumber
|
- VER_MAJORVERSION
- 0x0000002
| dwMajorVersion
|
- VER_MINORVERSION
- 0x0000001
| dwMinorVersion
|
- VER_PLATFORMID
- 0x0000008
| dwPlatformId
|
- VER_PRODUCT_TYPE
- 0x0000080
| wProductType
|
- VER_SERVICEPACKMAJOR
- 0x0000020
| wServicePackMajor
|
- VER_SERVICEPACKMINOR
- 0x0000010
| wServicePackMinor
|
- VER_SUITENAME
- 0x0000040
| wSuiteMask
|
- dwConditionMask
-
The operator to use for the comparison. The
VerifyVersionInfo function uses this operator to compare a specified attribute value to the corresponding value for the currently running system.
For all values of dwTypeBitMask other than VER_SUITENAME, this parameter can be one of the following values.
| Value | Meaning |
- VER_EQUAL
- 1
| The current value must be equal to the specified value.
|
- VER_GREATER
- 2
| The current value must be greater than the specified value.
|
- VER_GREATER_EQUAL
- 3
| The current value must be greater than or equal to the specified value.
|
- VER_LESS
- 4
| The current value must be less than the specified value.
|
- VER_LESS_EQUAL
- 5
| The current value must be less than or equal to the specified value.
|
If dwTypeBitMask is VER_SUITENAME, this parameter can be one of the following values.
| Value | Meaning |
- VER_AND
- 6
| All product suites specified in the wSuiteMask member must be present in the current system.
|
- VER_OR
- 7
| At least one of the specified product suites must be present in the current system.
|
Return Value
The macro returns the condition mask value.
Remarks
Call this macro once for each bit set in the dwTypeMask parameter of the
VerifyVersionInfo function.
Examples
For an example, see
Verifying the System Version.
Requirements
Minimum supported client | Windows 2000 Professional |
Minimum supported server | Windows 2000 Server |
Header | Winnt.h (include Windows.h) |
See Also
- OSVERSIONINFOEX
- VerifyVersionInfo
Send comments about this topic to Microsoft
Build date: 2/4/2010