Well, I can't check under Win2000, but if you really get 2 there, then MS has fixed a bug in the meantime. The SDK says:
"If the two strings are of different lengths, they are compared up to the length of the shortest one. If they are equal to that point, then the return value will indicate that the longer string is greater." IOW the function should indeed return 1. Gunnar ----- Original Message ----- From: "Vinod B" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Thursday, October 11, 2007 9:57 AM Subject: comparestring function different in Windows XP from the one in Windows 2000 > > Greetings! > > > > I'm hit with a clueless question. What has been changed in comparestring > function in Win XP for which it behaves differently from the Win 2000 > version of it? > > > > Looking at the following example (though it might sound weird), > > > > CompareString(LOCALE_USER_DEFAULT, NORM_IGNORECASE, > PChar('ABC'), > > 3, PChar('ABC'+ #0 + 'AB' + #0 + #0 + #0 + #0), 10) > > > > The above call is giving me result 2 in Widows 2000 and > result 1 in Windows XP. What has been changed in this function for this > change in the behaviour? Please help me find an answer. > > > > vinubal > > > > J&B Software India Pvt Ltd | 6th Floor,Tower 1, Rayala Towers, 158, Mt. > Road, Chennai 600 002 | Tel: 91 44 28411342 | Fax: 91 44 28411172 |Web: > www.jbsoftindia.com > > --------------------DISCLAIMER-------------------- > > The contents of this E-mail (including the contents of the enclosure/s or > attachment/s) if (any) are privileged and confidential material of J&B > Software India Pvt Ltd and should not be disclosed to, used by or copied > in any manner by anyone other than the intended addressee/(s). If this > E-mail (including the enclosure/(s) or attachment/(s) if any) has been > received in error, please advise the sender immediately and delete it from > your system. The views expressed in this E-mail message (including the > enclosure/(s)or attachment/(s) if any) are those of the individual sender, > except where the sender expressly, and with authority, states them to be > the views of J&B Software India Pvt Ltd > _______________________________________________ > Delphi mailing list -> [email protected] > http://www.elists.org/mailman/listinfo/delphi _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

