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.

224 lines
10 KiB

  1. //#define CEXPORT extern "C"__declspec( dllexport )
  2. #define CEXPORT
  3. //---------------------------------------------------------------------------
  4. // Call this exported function to enable/disable logging to "intlstr.log"
  5. // -disabled by default
  6. //---------------------------------------------------------------------------
  7. CEXPORT
  8. void
  9. FAR PASCAL StringLogging(
  10. BOOL bActiveState);
  11. typedef void ( FAR PASCAL *FNStringLogging)(BOOL bActiveState);
  12. //---------------------------------------------------------------------------
  13. // Call this exported function to generate and retrieve a random string.
  14. // iMaxChar - Maximum number of characters (not bytes) in the return string.
  15. // bAbsolute - TRUE, if you want the exact number of char specify in iMaxChar
  16. // FALSE, if you want a random number of char, up to a maximum of iMaxChar.
  17. // bValidate - TRUE, if you want every char to be a legal char
  18. // FALSE, if you do not want any validation. Will gen any char
  19. // with in the 255 and DBCS range.
  20. //
  21. //---------------------------------------------------------------------------
  22. CEXPORT
  23. int
  24. FAR PASCAL GetRandIntlString(
  25. int iMaxChars,
  26. BOOL bAbs,
  27. BOOL bCheck,
  28. LPSTR szInternational);
  29. typedef int ( FAR PASCAL *FNGetRandIntlString)(int iMaxChars, BOOL bAbs, BOOL bCheck, LPSTR szInternational);
  30. //---------------------------------------------------------------------------
  31. // Call this exported function to generate and retrieve a sequential string.
  32. // iMaxChar - Maximum number of characters (not bytes) in the return string.
  33. // bAbsolute - TRUE, if you want the exact number of char specify in iMaxChar
  34. // FALSE, if you want a random number of char, up to a maximum of iMaxChar.
  35. // bValidate - TRUE, if you want every char to be a legal char
  36. // FALSE, if you do not want any validation. Will gen any char
  37. // with in the 255 and DBCS range.
  38. //
  39. //---------------------------------------------------------------------------
  40. CEXPORT
  41. int
  42. FAR PASCAL GetIntlString(
  43. int iMaxChars,
  44. BOOL bAbs,
  45. BOOL bCheck,
  46. LPSTR szInternational);
  47. typedef int ( FAR PASCAL *FNGetIntlString)(int iMaxChars, BOOL bAbs, BOOL bCheck, LPSTR szInternational);
  48. //---------------------------------------------------------------------------
  49. // Call this exported function to generate and retrieve a string with the locale
  50. // Specific top 20 problem characters as identified by the test leads of those
  51. // Areas
  52. //
  53. // iMaxChar - Maximum number of characters (not bytes) in the return string.
  54. // bAbsolute - TRUE, if you want the exact number of char specify in iMaxChar
  55. // FALSE, if you want a random number of char, up to a maximum of iMaxChar.
  56. // bValidate - TRUE, if you want every char to be a legal char
  57. // FALSE, if you do not want any validation. Will gen any char
  58. // with in the 255 and DBCS range.
  59. //
  60. //---------------------------------------------------------------------------
  61. CEXPORT
  62. int FAR PASCAL GetProbCharString(
  63. int iMaxChars,
  64. BOOL bAbs,
  65. BOOL bCheck,
  66. LPSTR szInternational);
  67. //or
  68. typedef int ( FAR PASCAL *FNGetProbCharString)(int iMaxChars, BOOL bAbs, BOOL bCheck, LPSTR szInternational);
  69. CEXPORT
  70. int FAR PASCAL GetTop20String(
  71. int iMaxChars,
  72. BOOL bAbs,
  73. BOOL bCheck,
  74. LPSTR szInternational);
  75. //or
  76. typedef int ( FAR PASCAL *FNGetTop20String)(int iMaxChars, BOOL bAbs, BOOL bCheck, LPSTR szInternational);
  77. //---------------------------------------------------------------------------
  78. // This function returns a string of problem Unicode Round Trip Conversion
  79. // characters if there are found problem characters for the tested code page.
  80. // Currently (2/98) only Japanese code page 932 has identified urtc problem characters.
  81. // If this function is invoked on a non-japanese machine, problem characters
  82. // are returned like GetProbCharString() is invoked.
  83. //---------------------------------------------------------------------------
  84. CEXPORT
  85. int
  86. WINAPI GetProbURTCString(
  87. int iMaxChars,
  88. BOOL bAbs,
  89. BOOL bCheck,
  90. LPSTR szInternational);
  91. typedef int ( WINAPI *FNGetProbURTCString)(int iMaxChars, BOOL bAbs, BOOL bCheck, LPSTR szInternational);
  92. //=====GetUniStrRandAnsi========================================================
  93. // Added by Smoore 05-28-98 per willro's instruction
  94. // PURPOSE:
  95. // This function returns a string of Unicode, UTF7, or UTF8 characters.
  96. // These characters may or may not be valid ansi characters when converted
  97. // depending on the setting of bCheck (true or fault)
  98. // PARAMETERS:
  99. // iMaxChars: int maximum number of chars (bytes) in szbuff. Must >= 4
  100. // because each UTFs char can be upto 3 bytes long.
  101. // bAbs: if set true, exact number (iMaxChars) will be generated,
  102. // if set falise, number of generated chars will be random.
  103. // bcheck: if true, generated chars will be based on valid ansi chars
  104. // if false, generated chars may be based on random ansi chars
  105. // which can contain invalid and or mapped ansi chars.
  106. // szbuff: string buffer (bytes) to contain converted unicode characters
  107. // Size must match the value of iMaxChars.
  108. // iType: Type of conversion to make. For example Unicode, UTF7, or UTF8.
  109. // iacp: Reserved. Must be 0 for now until further notice.
  110. // Currently the generated string is based on the system's ansi code page.
  111. // In the future, these functions will generate string based on the input acp.
  112. //
  113. // RETURN: -1 if failed or
  114. // if iType is UNICODE, return number of wide characters in szbuff.
  115. // if iType is UTFs, return number of bytes in szbuff
  116. //========================================================================
  117. CEXPORT
  118. int
  119. WINAPI GetUniStrRandAnsi(
  120. int iMaxChars,
  121. BOOL bAbs,
  122. BOOL bCheck,
  123. LPSTR szbuff,
  124. int iType,
  125. int iacp);
  126. typedef int ( WINAPI *FNGetUniStrRandAnsi)(int iMaxChars, BOOL bAbs, BOOL bCheck, LPSTR szbuff, int iType, int iacp);
  127. //=====GetUniStrInvalidAnsi==================================================
  128. // Added by Smoore 05-28-98 per willro's instruction
  129. // PURPOSE:
  130. // This function returns a string of Unicode, UTF7, or UTF8 characters.
  131. // If this string is converted to ansi, the ansi characters will be invalid.
  132. // PARAMETERS:
  133. // iMaxChars: int maximum number of chars (bytes) in szbuff. Must >= 4
  134. // because each UTFs char can be upto 3 bytes long.
  135. // bAbs: if set true, exact number (iMaxChars) will be generated,
  136. // if set falise, number of generated chars will be random.
  137. // bcheck: if true, generated unicode chars will be based on valid ansi chars
  138. // if false, generated unicode char may be based on random ansi chars
  139. // which can contain invalid and or mapped ansi chars.
  140. // szbuff: string buffer (bytes) to contain converted unicode characters
  141. // Size must match the value of iMaxChars.
  142. // iType: Type of conversion to make. For example Unicode, UTF7, or UTF8.
  143. // iacp: Reserved. Must be 0 for now until further notice.
  144. // Currently the generated string is based on the system's ansi code page.
  145. // In the future, these functions will generate string based on the input acp.
  146. //
  147. // RETURN: -1 if failed or
  148. // if iType is UNICODE, return number of wide characters in szbuff.
  149. // if iType is UTFs, return number of bytes in szbuff
  150. //==========================================================================
  151. CEXPORT
  152. int
  153. WINAPI GetUniStrInvalidAnsi(
  154. int iMaxChars,
  155. BOOL bAbs,
  156. LPSTR szbuff,
  157. int iType,
  158. int iacp);
  159. typedef int ( WINAPI *FNGetUniStrInvalidAnsi)(int iMaxChars, BOOL bAbs, LPSTR szbuff, int iType, int iacp);
  160. //=====GetUniStrMappedAnsi==================================================
  161. // Added by Smoore 05-28-98 per willro's instruction
  162. // PURPOSE:
  163. // This function returns a string of Unicode, UTF7, or UTF8 characters.
  164. // If this string is converted to ansi, the ansi characters will be mapped.
  165. // For example, the copy right symbol ( circleed c) will be mapped to C
  166. // in some code pages.
  167. // PARAMETERS:
  168. // iMaxChars: int maximum number of chars (bytes) in szbuff. Must >= 4
  169. // because each UTFs char can be upto 3 bytes long.
  170. // bAbs: if set true, exact number (iMaxChars) will be generated,
  171. // if set falise, number of generated chars will be random.
  172. // bcheck: if true, generated unicode chars will be based on valid ansi chars
  173. // if false, generated unicode char may be based on random ansi chars
  174. // which can contain invalid and or mapped ansi chars.
  175. // szbuff: string buffer (bytes) to contain converted unicode characters
  176. // Size must match the value of iMaxChars.
  177. // iType: Type of conversion to make. For example Unicode, UTF7, or UTF8.
  178. // iacp: Reserved. Must be 0 for now until further notice.
  179. // Currently the generated string is based on the system's ansi code page.
  180. // In the future, these functions will generate string based on the input acp.
  181. //
  182. // RETURN: -1 if failed or
  183. // if iType is UNICODE, return number of wide characters in szbuff.
  184. // if iType is UTFs, return number of bytes in szbuff
  185. //==========================================================================
  186. CEXPORT
  187. int
  188. WINAPI GetUniStrMappedAnsi(
  189. int iMaxChars,
  190. BOOL bAbs,
  191. LPSTR szbuff,
  192. int iType,
  193. int iacp);
  194. typedef int ( WINAPI *FNGetUniStrMappedAnsi)(int iMaxChars, BOOL bAbs, LPSTR szbuff, int iType, int iacp);