Source code of Windows XP (NT5)
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.

50 lines
1.7 KiB

  1. //+------------------------------------------------------------
  2. //
  3. // Copyright (C) 2000, Microsoft Corporation
  4. //
  5. // File: CodePageConvert.h
  6. //
  7. // Functions:
  8. // HrCodePageConvert
  9. // HrCodePageConvert
  10. // HrCodePageConvertFree
  11. // HrCodePageConvertInternal
  12. //
  13. // History:
  14. // aszafer 2000/03/29 created
  15. //-------------------------------------------------------------
  16. #ifndef _CODEPAGECONVERT_H_
  17. #define _CODEPAGECONVERT_H_
  18. #include "windows.h"
  19. #define TEMPBUFFER_WCHARS 316
  20. HRESULT HrCodePageConvert (
  21. IN UINT uiSourceCodePage, // Source code page
  22. IN LPSTR pszSourceString, // Source String
  23. IN UINT uiTargetCodePage, // Target code page
  24. OUT LPSTR pszTargetString, // p to prealloc buffer where target string is returned
  25. IN int cbTargetStringBuffer); // cbytes in prealloc buffer for target string
  26. HRESULT HrCodePageConvert (
  27. IN UINT uiSourceCodePage, // Source code page
  28. IN LPSTR pszSourceString, // Source string
  29. IN UINT uiTargetCodePage, // Target code page
  30. OUT LPSTR * ppszTargetString); // p to where target string is returned
  31. VOID HrCodePageConvertFree (LPSTR pszTargetString); //p to memory allocated by HrCodePageConvert
  32. HRESULT HrCodePageConvertInternal (
  33. IN UINT uiSourceCodePage, // source code page
  34. IN LPSTR pszSourceString, // source string
  35. IN UINT uiTargetCodePage, // target code page
  36. OUT LPSTR pszTargetString, // target string or NULL
  37. IN int cbTargetStringBuffer, // cb in target string or 0
  38. OUT LPSTR* ppszTargetString ); // NULL or p to where target string is returned
  39. #endif //_CODEPAGECONVERT_H_