Hi,
This won't work as by definition a WinAPI function is usually not supposed to reset the last error if no error has occurred, so GetLastError() may return an error even though the strings were just simply equal.
Of course it 'works':
SetLastError(0); SomeCall(); if (GetLastError()) { ... }
This is common, albeit braindead, Windows programming practice.
So I think that documentation is just simply wrong, also MSDN doesn't say anything about this function returning any error indication.
The documentation is _correct_ for the _implementation_ of these functions. Please read the code.
I didn't implement these functions, I simply documented how they behave under Wine. If you think their implementation differs in an important way from native Windows, please submit a bug and/or test case and/or a code patch to remove the difference. If you believe they behave differently for good reason, please submit a documentation patch describing the difference for developers using these functions.
The fact that MSDN doesn't describe an error return does not mean there isn't one. Of course it doesn't mean there is, either. Perhaps lstrcmp crashes on invalid input under native, I don't know. The only way to know for sure is to write and run a test. Feel free!
Cheers, Jon
===== "Don't wait for the seas to part, or messiahs to come; Don't you sit around and waste this chance..." - Live
jon_p_griffiths@yahoo.com
__________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com