VarCmp function
Compares two variants.
Syntax
HRESULT VarCmp( _In_ LPVARIANT pvarLeft, _In_ LPVARIANT pvarRight, _In_ LCID lcid, _In_ ULONG dwFlags );
Parameters
- pvarLeft [in]
-
The first variant.
- pvarRight [in]
-
The second variant.
- lcid [in]
-
The locale identifier.
- dwFlags [in]
-
The compare results option.
Return value
This function can return one of these values.
| Return code/value | Description |
|---|---|
|
pvarLeft is less than pvarRight. |
|
The parameters are equal. |
|
pvarLeft is greater than pvarRight. |
|
Either expression is NULL. |
Remarks
The function only compares the value of the variant types. It compares strings, integers, and floating points, but not arrays or records.
NORM_IGNOREWIDTH causes VarCmp to ignore the difference between half-width and full-width characters, as the following example demonstrates:
"Cat"== "cat"
The full-width form is a formatting distinction used in Chinese and Japanese scripts.
Requirements
|
Header |
|
|---|---|
|
Library |
|
|
DLL |
|
See also