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.

127 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. Unitext.h
  5. Abstract:
  6. Main header file for unicode <--> ansi/oem text file translator.
  7. Author:
  8. Ted Miller (tedm) 16-March-1993
  9. Revision History:
  10. --*/
  11. #define UNICODE
  12. //
  13. // Include files
  14. //
  15. #include <windows.h>
  16. #include <stdarg.h>
  17. #include <process.h>
  18. #include "utmsgs.h"
  19. #include "wargs.h"
  20. //
  21. // Unicode byte order marks.
  22. //
  23. #define BYTE_ORDER_MARK 0xfeff
  24. #define SWAPPED_BYTE_ORDER_MARK 0xfffe
  25. //
  26. // Define flags for a type of text file.
  27. //
  28. #define TFILE_NONE 0
  29. #define TFILE_UNICODE 0x0001
  30. #define TFILE_ANSI 0x0010
  31. #define TFILE_OEM 0x0020
  32. #define TFILE_USERCP 0x0040
  33. #define TFILE_MULTIBYTE 0x00f0
  34. //
  35. // Define conversion types.
  36. //
  37. #define CONVERT_NONE 0
  38. #define UNICODE_TO_MB 1
  39. #define MB_TO_UNICODE 2
  40. //
  41. // Define conversion options
  42. //
  43. #define CHECK_NONE 3
  44. #define CHECK_ALREADY_UNICODE 4
  45. #define CHECK_IF_NOT_UNICODE 5
  46. #define CHECK_CONVERSION 6
  47. //
  48. //
  49. // Function prototypes
  50. //
  51. //
  52. // From ututil.c
  53. //
  54. VOID
  55. MsgPrintfW(
  56. IN DWORD MessageId,
  57. ...
  58. );
  59. VOID
  60. vMsgPrintfW(
  61. IN DWORD MessageId,
  62. IN va_list arglist
  63. );
  64. VOID
  65. ErrorAbort(
  66. IN DWORD MessageId,
  67. ...
  68. );
  69. VOID
  70. MyReadFile(
  71. IN HANDLE FileHandle,
  72. OUT PVOID Buffer,
  73. IN DWORD BytesToRead,
  74. IN LPWSTR Filename
  75. );
  76. //
  77. // From utmb2u.c
  78. //
  79. VOID
  80. MultibyteTextFileToUnicode(
  81. IN LPWSTR SourceFileName,
  82. IN LPWSTR TargetFileName,
  83. IN HANDLE SourceFileHandle,
  84. IN HANDLE TargetFileHandle,
  85. IN DWORD SourceFileSize,
  86. IN UINT SourceCodePage
  87. );
  88. //
  89. // From utu2mb.c
  90. //
  91. VOID
  92. UnicodeTextFileToMultibyte(
  93. IN LPWSTR SourceFileName,
  94. IN LPWSTR TargetFileName,
  95. IN HANDLE SourceFileHandle,
  96. IN HANDLE TargetFileHandle,
  97. IN DWORD SourceFileSize,
  98. IN UINT TargetCodePage
  99. );