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.

40 lines
1.9 KiB

  1. // --------------------------------------------------------------------------
  2. // Module Name: StringConvert.h
  3. //
  4. // Copyright (c) 1999-2000, Microsoft Corporation
  5. //
  6. // Utility string functions. These are probably duplicated in some form in
  7. // shlwapi.dll. Currently this file exists to prevent some dependencies on
  8. // that file.
  9. //
  10. // History: 1999-08-23 vtan created
  11. // 1999-11-16 vtan separate file
  12. // 2000-01-31 vtan moved from Neptune to Whistler
  13. // --------------------------------------------------------------------------
  14. #ifndef _StringConvert_
  15. #define _StringConvert_
  16. // --------------------------------------------------------------------------
  17. // CStringConvert
  18. //
  19. // Purpose: Collection of string conversion related functions bundled
  20. // into the CStringConvert namespace.
  21. //
  22. // History: 1999-08-23 vtan created
  23. // 2000-01-31 vtan moved from Neptune to Whistler
  24. // --------------------------------------------------------------------------
  25. class CStringConvert
  26. {
  27. public:
  28. static int AnsiToUnicode (const char *pszAnsiString, WCHAR *pszUnicodeString, int iUnicodeStringCount);
  29. static int UnicodeToAnsi (const WCHAR *pszUnicodeString, char *pszAnsiString, int iAnsiStringCount);
  30. static void TCharToUnicode (const TCHAR *pszString, WCHAR *pszUnicodeString, int iUnicodeStringCount);
  31. static void UnicodeToTChar (const WCHAR *pszUnicodeString, TCHAR *pszString, int iStringCount);
  32. static void TCharToAnsi (const TCHAR *pszString, char *pszAnsiString, int iAnsiStringCount);
  33. static void AnsiToTChar (const char *pszAnsiString, TCHAR *pszString, int iStringCount);
  34. };
  35. #endif /* _StringConvert_ */