DdeCmpStringHandles

  int DdeCmpStringHandles(hsz1, hsz2)    
  HSZ hsz1; /* handle of first string */
  HSZ hsz2; /* handle of second string */

The DdeCmpStringHandles function compares the values of two string handles. The value of a string handle is not related to the case of the associated string.

Parameters

hsz1

Specifies the first string handle.

hsz2

Specifies the second string handle.

Return Value

The return value can be one of the following:

Value Meaning

-1 The value of hsz1 is either 0 or less than the value of hsz2.
0 The values of hsz1 and hsz2 are equal (both can be 0).
1 The value of hsz2 is either 0 or less than the value of hsz1.

Comments

An application that needs to do a case-sensitive comparison of two string handles should compare the string handles directly. An application should use DdeCmpStringHandles for all other comparisons to preserve the case-sensitive nature of dynamic data exchange (DDE).

The DdeCmpStringHandles function cannot be used to sort string handles alphabetically.

See Also

DdeAccessData, DdeCreateStringHandle, DdeFreeStringHandle