Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
747 B

  1. //============================================================================
  2. //
  3. // DBCS and UNICODE aware string routines
  4. //
  5. //
  6. //============================================================================
  7. #include "pch.hxx" // not really a pch in this case, just a header
  8. #include "wstrings.h"
  9. #pragma warning (disable: 4706) // assignment within conditional expression
  10. OESTDAPI_(BOOL) UnlocStrEqNW(LPCWSTR pwsz1, LPCWSTR pwsz2, DWORD cch)
  11. {
  12. if (!pwsz1 || !pwsz2)
  13. {
  14. if (!pwsz1 && !pwsz2)
  15. return TRUE;
  16. return FALSE;
  17. }
  18. while (cch && *pwsz1 && *pwsz2 && (*pwsz1 == *pwsz2))
  19. {
  20. pwsz1++;
  21. pwsz2++;
  22. cch--;
  23. }
  24. return !cch;
  25. }