The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
WindowsCompareStringOrdinal function
Compares two specified HSTRING objects and returns an integer that indicates their relative position in a sort order.
Syntax
HRESULT WINAPI WindowsCompareStringOrdinal( _In_ HSTRING string1, _In_ HSTRING string2, _Out_ INT32 *result );
Parameters
- string1 [in]
-
Type: HSTRING
The first string to compare.
- string2 [in]
-
Type: HSTRING
The second string to compare.
- result [out]
-
Type: INT32*
A value that indicates the lexical relationship between string1 and string2.
Return value
Type: HRESULT
This function can return one of these values.
| Return code | Description |
|---|---|
|
The comparison was successful. |
|
result is NULL. |
Remarks
Use the WindowsCompareStringOrdinal function to compare two HSTRING objects. After the comparison completes, the result out parameter contains one of three values.
| Value | Condition |
|---|---|
| -1 | string1 is less than string2. |
| 0 | string1 equals string2. |
| 1 | string1 is greater than string2. |
Windows Phone 8: This API is supported.
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Header |
|
|
Library |
|
Build date: 5/16/2013