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.

61 lines
1.5 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1992.
  5. //
  6. // File: StgVarB.cxx
  7. //
  8. // Contents: C++ Base wrapper for PROPVARIANT.
  9. //
  10. //--------------------------------------------------------------------------
  11. #include "pch.cxx"
  12. #include <ctype.h>
  13. /* right now only US ansi support */
  14. EXTERN_C
  15. STDAPI_(UINT) GetACP(VOID)
  16. { return 1252; } /* Latin 1 (US, Western Europe) */
  17. #if DBGPROP
  18. BOOLEAN
  19. IsUnicodeString(WCHAR const *pwszname, ULONG cb)
  20. {
  21. if (cb != 0)
  22. {
  23. for (ULONG i = 0; pwszname[i] != (OLECHAR)'\0'; i++)
  24. {
  25. }
  26. // If cb isn't MAXULONG we verify that cb is at least as
  27. // big as the string. We can't check for equality, because
  28. // there are some property sets in which the length field
  29. // for a string may include several zero padding bytes.
  30. PROPASSERT(cb == MAXULONG || (i + 1) * sizeof(WCHAR) <= cb);
  31. }
  32. return(TRUE);
  33. }
  34. BOOLEAN
  35. IsAnsiString(CHAR const *pszname, ULONG cb)
  36. {
  37. if (cb != 0)
  38. {
  39. for (ULONG i = 0; pszname[i] != '\0'; i++)
  40. {
  41. }
  42. // If cb isn't MAXULONG we verify that cb is at least as
  43. // big as the string. We can't check for equality, because
  44. // there are some property sets in which the length field
  45. // for a string may include several zero padding bytes.
  46. PROPASSERT(cb == MAXULONG || i + 1 <= cb);
  47. }
  48. return(TRUE);
  49. }
  50. #endif