Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Compares two variants.
HRESULT VarCmp(
[in] LPVARIANT pvarLeft,
[in] LPVARIANT pvarRight,
[in] LCID lcid,
[in] ULONG dwFlags
);
[in] pvarLeft
The first variant.
[in] pvarRight
The second variant.
[in] lcid
The locale identifier.
[in] dwFlags
The compare results option.
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. |
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.
Requirement | Value |
---|---|
Target Platform | Windows |
Header | oleauto.h |
Library | OleAut32.lib |
DLL | OleAut32.dll |
Automation Programming Reference
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!