lstrcmp,lstrcmpi
Functional Difference from WIN95
According to MSDN (January '96), this function returns the difference of the values of the first unequal characters it encounters. But the actual result is different from that description. Actually, if the function succeeds and the string pointed to by lpString1 is less than the string pointed to by lpString2, the return value is '-1'; if the string pointed to by lpString1 is greater than the string pointed to by lpString2, it is '1'. If the strings are equal, the return value is zero. This result is same in WIN95, WIN95 Service Pack1 and WindowsNT 3.51. Open32 doesn't follow MSDN, but follow the actual action of these.
Functional Difference from SBCS Open32
These APIs are modified to be locale-sensitive.
Implementation
It should be possible to compare strings depends on user language, like as in WIN95. SBCS Open32 implements this function by using strcmp. It is invalid to use strcmp, as user locale or user language determines which string is greater (or whether the strings are the same.) This function gets the sort key by calling LCMapString and compares the result; sort key array. As for the reason not to use UniStrcoll and UniStrcmpi, see the description in CompareString.CharLower,CharUpper,CharLowerBuff,CharUpperBuff
Functional Difference from WIN95
N/A
Functional Difference from SBCS Open32
Conversion by SBCS Open32 is determined by the country / code page of the current process. These APIs are modified to be locale-sensitive.
Implementation
Though it depends on the design of user locale in Open32, SBCS Open32 implementation is wrong. SBCS Open32 implements this function by using Dos Case Map, which depends on the specified country code and code page. To convert based on user locale, ascii string is mapped to wide-character string with using UniUconvToUcs. And UniTransLower for CharLower/CharLowerBuff and UniTransUpper for CharUpper/CharUpperBuff are used. This string is back to ascii string with using UniUconvToUcs and this function updates the buffer with this new ascii string.