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.

1602 lines
57 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation All rights reserved.
  3. Module Name:
  4. winnls.h
  5. Abstract:
  6. Procedure declarations, constant definitions, and macros for the
  7. NLS component.
  8. --*/
  9. /*++ BUILD Version: 0003 // Increment this if a change has global effects ;internal_NT
  10. ;internal_NT
  11. Copyright (c) Microsoft Corporation. All rights reserved. ;internal_NT
  12. ;internal_NT
  13. Module Name: ;internal_NT
  14. ;internal_NT
  15. winnlsp.h ;internal_NT
  16. ;internal_NT
  17. Abstract: ;internal_NT
  18. ;internal_NT
  19. Private procedure declarations, constant definitions, and macros for the ;internal_NT
  20. NLS component. ;internal_NT
  21. ;internal_NT
  22. --*/ ;internal_NT
  23. ;internal_NT
  24. #ifndef _WINNLS_
  25. #define _WINNLS_
  26. #ifndef _WINNLSP_ ;internal_NT
  27. #define _WINNLSP_ ;internal_NT
  28. ;both
  29. #ifdef __cplusplus ;both
  30. extern "C" { ;both
  31. #endif ;both
  32. ;both
  33. #ifndef NONLS
  34. #ifdef _MAC
  35. #include <macwin32.h>
  36. #endif
  37. ////////////////////////////////////////////////////////////////////////////
  38. //
  39. // Constants
  40. //
  41. // Define all constants for the NLS component here.
  42. //
  43. ////////////////////////////////////////////////////////////////////////////
  44. //
  45. // String Length Maximums.
  46. //
  47. #define MAX_LEADBYTES 12 // 5 ranges, 2 bytes ea., 0 term.
  48. #define MAX_DEFAULTCHAR 2 // single or double byte
  49. //
  50. // MBCS and Unicode Translation Flags.
  51. //
  52. #define MB_PRECOMPOSED 0x00000001 // use precomposed chars
  53. #define MB_COMPOSITE 0x00000002 // use composite chars
  54. #define MB_USEGLYPHCHARS 0x00000004 // use glyph chars, not ctrl chars
  55. #define MB_ERR_INVALID_CHARS 0x00000008 // error for invalid chars
  56. #define WC_COMPOSITECHECK 0x00000200 // convert composite to precomposed
  57. #define WC_DISCARDNS 0x00000010 // discard non-spacing chars
  58. #define WC_SEPCHARS 0x00000020 // generate separate chars
  59. #define WC_DEFAULTCHAR 0x00000040 // replace w/ default char
  60. ;begin_winver_500
  61. #define WC_NO_BEST_FIT_CHARS 0x00000400 // do not use best fit chars
  62. ;end_winver_500
  63. ;internal_NT
  64. // ;internal_NT
  65. // Flags for DLL Code Page Translation Function. ;internal_NT
  66. // ;internal_NT
  67. #define NLS_CP_CPINFO 0x10000000 ;internal_NT
  68. #define NLS_CP_CPINFOEX 0x20000000 ;internal_NT
  69. #define NLS_CP_MBTOWC 0x40000000 ;internal_NT
  70. #define NLS_CP_WCTOMB 0x80000000 ;internal_NT
  71. ;internal_NT
  72. ;both
  73. //
  74. // Character Type Flags.
  75. //
  76. #define CT_CTYPE1 0x00000001 // ctype 1 information
  77. #define CT_CTYPE2 0x00000002 // ctype 2 information
  78. #define CT_CTYPE3 0x00000004 // ctype 3 information
  79. //
  80. // CType 1 Flag Bits.
  81. //
  82. #define C1_UPPER 0x0001 // upper case
  83. #define C1_LOWER 0x0002 // lower case
  84. #define C1_DIGIT 0x0004 // decimal digits
  85. #define C1_SPACE 0x0008 // spacing characters
  86. #define C1_PUNCT 0x0010 // punctuation characters
  87. #define C1_CNTRL 0x0020 // control characters
  88. #define C1_BLANK 0x0040 // blank characters
  89. #define C1_XDIGIT 0x0080 // other digits
  90. #define C1_ALPHA 0x0100 // any linguistic character
  91. #define C1_DEFINED 0x0200 // defined character
  92. //
  93. // CType 2 Flag Bits.
  94. //
  95. #define C2_LEFTTORIGHT 0x0001 // left to right
  96. #define C2_RIGHTTOLEFT 0x0002 // right to left
  97. #define C2_EUROPENUMBER 0x0003 // European number, digit
  98. #define C2_EUROPESEPARATOR 0x0004 // European numeric separator
  99. #define C2_EUROPETERMINATOR 0x0005 // European numeric terminator
  100. #define C2_ARABICNUMBER 0x0006 // Arabic number
  101. #define C2_COMMONSEPARATOR 0x0007 // common numeric separator
  102. #define C2_BLOCKSEPARATOR 0x0008 // block separator
  103. #define C2_SEGMENTSEPARATOR 0x0009 // segment separator
  104. #define C2_WHITESPACE 0x000A // white space
  105. #define C2_OTHERNEUTRAL 0x000B // other neutrals
  106. #define C2_NOTAPPLICABLE 0x0000 // no implicit directionality
  107. //
  108. // CType 3 Flag Bits.
  109. //
  110. #define C3_NONSPACING 0x0001 // nonspacing character
  111. #define C3_DIACRITIC 0x0002 // diacritic mark
  112. #define C3_VOWELMARK 0x0004 // vowel mark
  113. #define C3_SYMBOL 0x0008 // symbols
  114. #define C3_KATAKANA 0x0010 // katakana character
  115. #define C3_HIRAGANA 0x0020 // hiragana character
  116. #define C3_HALFWIDTH 0x0040 // half width character
  117. #define C3_FULLWIDTH 0x0080 // full width character
  118. #define C3_IDEOGRAPH 0x0100 // ideographic character
  119. #define C3_KASHIDA 0x0200 // Arabic kashida character
  120. #define C3_LEXICAL 0x0400 // lexical character
  121. #define C3_ALPHA 0x8000 // any linguistic char (C1_ALPHA)
  122. #define C3_NOTAPPLICABLE 0x0000 // ctype 3 is not applicable
  123. //
  124. // String Flags.
  125. //
  126. #define NORM_IGNORECASE 0x00000001 // ignore case
  127. #define NORM_IGNORENONSPACE 0x00000002 // ignore nonspacing chars
  128. #define NORM_IGNORESYMBOLS 0x00000004 // ignore symbols
  129. #define NORM_IGNOREKANATYPE 0x00010000 // ignore kanatype
  130. #define NORM_IGNOREWIDTH 0x00020000 // ignore width
  131. #define NORM_STOP_ON_NULL 0x10000000 // stop at the null termination ;internal_NT
  132. ;internal_NT
  133. //
  134. // Locale Independent Mapping Flags.
  135. //
  136. #define MAP_FOLDCZONE 0x00000010 // fold compatibility zone chars
  137. #define MAP_PRECOMPOSED 0x00000020 // convert to precomposed chars
  138. #define MAP_COMPOSITE 0x00000040 // convert to composite chars
  139. #define MAP_FOLDDIGITS 0x00000080 // all digits to ASCII 0-9
  140. ;begin_winver_500
  141. #define MAP_EXPAND_LIGATURES 0x00002000 // expand all ligatures
  142. ;end_winver_500
  143. //
  144. // Locale Dependent Mapping Flags.
  145. //
  146. #define LCMAP_LOWERCASE 0x00000100 // lower case letters
  147. #define LCMAP_UPPERCASE 0x00000200 // upper case letters
  148. #define LCMAP_SORTKEY 0x00000400 // WC sort key (normalize)
  149. #define LCMAP_BYTEREV 0x00000800 // byte reversal
  150. #define LCMAP_HIRAGANA 0x00100000 // map katakana to hiragana
  151. #define LCMAP_KATAKANA 0x00200000 // map hiragana to katakana
  152. #define LCMAP_HALFWIDTH 0x00400000 // map double byte to single byte
  153. #define LCMAP_FULLWIDTH 0x00800000 // map single byte to double byte
  154. #define LCMAP_LINGUISTIC_CASING 0x01000000 // use linguistic rules for casing
  155. #define LCMAP_SIMPLIFIED_CHINESE 0x02000000 // map traditional chinese to simplified chinese
  156. #define LCMAP_TRADITIONAL_CHINESE 0x04000000 // map simplified chinese to traditional chinese
  157. #define LCMAP_IGNOREDBCS 0x80000000 // don't casemap DBCS characters ;internal_win40
  158. ;internal_win40
  159. //
  160. // Language Group Enumeration Flags.
  161. //
  162. #define LGRPID_INSTALLED 0x00000001 // installed language group ids
  163. #define LGRPID_SUPPORTED 0x00000002 // supported language group ids
  164. //
  165. // Locale Enumeration Flags.
  166. //
  167. #define LCID_INSTALLED 0x00000001 // installed locale ids
  168. #define LCID_SUPPORTED 0x00000002 // supported locale ids
  169. #define LCID_ALTERNATE_SORTS 0x00000004 // alternate sort locale ids
  170. //
  171. // Code Page Enumeration Flags.
  172. //
  173. #define CP_INSTALLED 0x00000001 // installed code page ids
  174. #define CP_SUPPORTED 0x00000002 // supported code page ids
  175. //
  176. // Sorting Flags.
  177. //
  178. // WORD Sort: culturally correct sort
  179. // hyphen and apostrophe are special cased
  180. // example: "coop" and "co-op" will sort together in a list
  181. //
  182. // co_op <------- underscore (symbol)
  183. // coat
  184. // comb
  185. // coop
  186. // co-op <------- hyphen (punctuation)
  187. // cork
  188. // went
  189. // were
  190. // we're <------- apostrophe (punctuation)
  191. //
  192. //
  193. // STRING Sort: hyphen and apostrophe will sort with all other symbols
  194. //
  195. // co-op <------- hyphen (punctuation)
  196. // co_op <------- underscore (symbol)
  197. // coat
  198. // comb
  199. // coop
  200. // cork
  201. // we're <------- apostrophe (punctuation)
  202. // went
  203. // were
  204. //
  205. #define SORT_STRINGSORT 0x00001000 // use string sort method
  206. //
  207. // Compare String Return Values.
  208. //
  209. #define CSTR_LESS_THAN 1 // string 1 less than string 2
  210. #define CSTR_EQUAL 2 // string 1 equal to string 2
  211. #define CSTR_GREATER_THAN 3 // string 1 greater than string 2
  212. //
  213. // Code Page Default Values.
  214. //
  215. #define CP_ACP 0 // default to ANSI code page
  216. #define CP_OEMCP 1 // default to OEM code page
  217. #define CP_MACCP 2 // default to MAC code page
  218. #define CP_THREAD_ACP 3 // current thread's ANSI code page
  219. #define CP_SYMBOL 42 // SYMBOL translations
  220. #define CP_UTF7 65000 // UTF-7 translation
  221. #define CP_UTF8 65001 // UTF-8 translation
  222. //
  223. // Country/Region Codes.
  224. //
  225. #define CTRY_DEFAULT 0
  226. #define CTRY_ALBANIA 355 // Albania
  227. #define CTRY_ALGERIA 213 // Algeria
  228. #define CTRY_ARGENTINA 54 // Argentina
  229. #define CTRY_ARMENIA 374 // Armenia
  230. #define CTRY_AUSTRALIA 61 // Australia
  231. #define CTRY_AUSTRIA 43 // Austria
  232. #define CTRY_AZERBAIJAN 994 // Azerbaijan
  233. #define CTRY_BAHRAIN 973 // Bahrain
  234. #define CTRY_BELARUS 375 // Belarus
  235. #define CTRY_BELGIUM 32 // Belgium
  236. #define CTRY_BELIZE 501 // Belize
  237. #define CTRY_BOLIVIA 591 // Bolivia
  238. #define CTRY_BRAZIL 55 // Brazil
  239. #define CTRY_BRUNEI_DARUSSALAM 673 // Brunei Darussalam
  240. #define CTRY_BULGARIA 359 // Bulgaria
  241. #define CTRY_CANADA 2 // Canada
  242. #define CTRY_CARIBBEAN 1 // Caribbean
  243. #define CTRY_CHILE 56 // Chile
  244. #define CTRY_COLOMBIA 57 // Colombia
  245. #define CTRY_COSTA_RICA 506 // Costa Rica
  246. #define CTRY_CROATIA 385 // Croatia
  247. #define CTRY_CZECH 420 // Czech Republic
  248. #define CTRY_DENMARK 45 // Denmark
  249. #define CTRY_DOMINICAN_REPUBLIC 1 // Dominican Republic
  250. #define CTRY_ECUADOR 593 // Ecuador
  251. #define CTRY_EGYPT 20 // Egypt
  252. #define CTRY_EL_SALVADOR 503 // El Salvador
  253. #define CTRY_ESTONIA 372 // Estonia
  254. #define CTRY_FAEROE_ISLANDS 298 // Faeroe Islands
  255. #define CTRY_FINLAND 358 // Finland
  256. #define CTRY_FRANCE 33 // France
  257. #define CTRY_GEORGIA 995 // Georgia
  258. #define CTRY_GERMANY 49 // Germany
  259. #define CTRY_GREECE 30 // Greece
  260. #define CTRY_GUATEMALA 502 // Guatemala
  261. #define CTRY_HONDURAS 504 // Honduras
  262. #define CTRY_HONG_KONG 852 // Hong Kong S.A.R., P.R.C.
  263. #define CTRY_HUNGARY 36 // Hungary
  264. #define CTRY_ICELAND 354 // Iceland
  265. #define CTRY_INDIA 91 // India
  266. #define CTRY_INDONESIA 62 // Indonesia
  267. #define CTRY_IRAN 981 // Iran
  268. #define CTRY_IRAQ 964 // Iraq
  269. #define CTRY_IRELAND 353 // Ireland
  270. #define CTRY_ISRAEL 972 // Israel
  271. #define CTRY_ITALY 39 // Italy
  272. #define CTRY_JAMAICA 1 // Jamaica
  273. #define CTRY_JAPAN 81 // Japan
  274. #define CTRY_JORDAN 962 // Jordan
  275. #define CTRY_KAZAKSTAN 7 // Kazakstan
  276. #define CTRY_KENYA 254 // Kenya
  277. #define CTRY_KUWAIT 965 // Kuwait
  278. #define CTRY_KYRGYZSTAN 996 // Kyrgyzstan
  279. #define CTRY_LATVIA 371 // Latvia
  280. #define CTRY_LEBANON 961 // Lebanon
  281. #define CTRY_LIBYA 218 // Libya
  282. #define CTRY_LIECHTENSTEIN 41 // Liechtenstein
  283. #define CTRY_LITHUANIA 370 // Lithuania
  284. #define CTRY_LUXEMBOURG 352 // Luxembourg
  285. #define CTRY_MACAU 853 // Macau S.A.R., PRC
  286. #define CTRY_MACEDONIA 389 // Former Yugoslav Republic of Macedonia
  287. #define CTRY_MALAYSIA 60 // Malaysia
  288. #define CTRY_MALDIVES 960 // Maldives
  289. #define CTRY_MEXICO 52 // Mexico
  290. #define CTRY_MONACO 33 // Principality of Monaco
  291. #define CTRY_MONGOLIA 976 // Mongolia
  292. #define CTRY_MOROCCO 212 // Morocco
  293. #define CTRY_NETHERLANDS 31 // Netherlands
  294. #define CTRY_NEW_ZEALAND 64 // New Zealand
  295. #define CTRY_NICARAGUA 505 // Nicaragua
  296. #define CTRY_NORWAY 47 // Norway
  297. #define CTRY_OMAN 968 // Oman
  298. #define CTRY_PAKISTAN 92 // Islamic Republic of Pakistan
  299. #define CTRY_PANAMA 507 // Panama
  300. #define CTRY_PARAGUAY 595 // Paraguay
  301. #define CTRY_PERU 51 // Peru
  302. #define CTRY_PHILIPPINES 63 // Republic of the Philippines
  303. #define CTRY_POLAND 48 // Poland
  304. #define CTRY_PORTUGAL 351 // Portugal
  305. #define CTRY_PRCHINA 86 // People's Republic of China
  306. #define CTRY_PUERTO_RICO 1 // Puerto Rico
  307. #define CTRY_QATAR 974 // Qatar
  308. #define CTRY_ROMANIA 40 // Romania
  309. #define CTRY_RUSSIA 7 // Russia
  310. #define CTRY_SAUDI_ARABIA 966 // Saudi Arabia
  311. #define CTRY_SERBIA 381 // Serbia
  312. #define CTRY_SINGAPORE 65 // Singapore
  313. #define CTRY_SLOVAK 421 // Slovak Republic
  314. #define CTRY_SLOVENIA 386 // Slovenia
  315. #define CTRY_SOUTH_AFRICA 27 // South Africa
  316. #define CTRY_SOUTH_KOREA 82 // Korea
  317. #define CTRY_SPAIN 34 // Spain
  318. #define CTRY_SWEDEN 46 // Sweden
  319. #define CTRY_SWITZERLAND 41 // Switzerland
  320. #define CTRY_SYRIA 963 // Syria
  321. #define CTRY_TAIWAN 886 // Taiwan
  322. #define CTRY_TATARSTAN 7 // Tatarstan
  323. #define CTRY_THAILAND 66 // Thailand
  324. #define CTRY_TRINIDAD_Y_TOBAGO 1 // Trinidad y Tobago
  325. #define CTRY_TUNISIA 216 // Tunisia
  326. #define CTRY_TURKEY 90 // Turkey
  327. #define CTRY_UAE 971 // U.A.E.
  328. #define CTRY_UKRAINE 380 // Ukraine
  329. #define CTRY_UNITED_KINGDOM 44 // United Kingdom
  330. #define CTRY_UNITED_STATES 1 // United States
  331. #define CTRY_URUGUAY 598 // Uruguay
  332. #define CTRY_UZBEKISTAN 7 // Uzbekistan
  333. #define CTRY_VENEZUELA 58 // Venezuela
  334. #define CTRY_VIET_NAM 84 // Viet Nam
  335. #define CTRY_YEMEN 967 // Yemen
  336. #define CTRY_ZIMBABWE 263 // Zimbabwe
  337. //
  338. // Locale Types.
  339. //
  340. // These types are used for the GetLocaleInfo NLS API routine.
  341. // Some of these types are also used for the SetLocaleInfo NLS API routine.
  342. //
  343. //
  344. // The following LCTypes may be used in combination with any other LCTypes.
  345. //
  346. // LOCALE_NOUSEROVERRIDE is also used in GetTimeFormat and
  347. // GetDateFormat.
  348. //
  349. // LOCALE_USE_CP_ACP is used in many of the A (Ansi) apis that need
  350. // to do string translation.
  351. //
  352. // LOCALE_RETURN_NUMBER will return the result from GetLocaleInfo as a
  353. // number instead of a string. This flag is only valid for the LCTypes
  354. // beginning with LOCALE_I.
  355. //
  356. #define LOCALE_NOUSEROVERRIDE 0x80000000 // do not use user overrides
  357. #define LOCALE_USE_CP_ACP 0x40000000 // use the system ACP
  358. ;begin_winver_400
  359. #define LOCALE_RETURN_NUMBER 0x20000000 // return number instead of string
  360. ;end_winver_400
  361. //
  362. // The following LCTypes are mutually exclusive in that they may NOT
  363. // be used in combination with each other.
  364. //
  365. #define LOCALE_ILANGUAGE 0x00000001 // language id
  366. #define LOCALE_SLANGUAGE 0x00000002 // localized name of language
  367. #define LOCALE_SENGLANGUAGE 0x00001001 // English name of language
  368. #define LOCALE_SABBREVLANGNAME 0x00000003 // abbreviated language name
  369. #define LOCALE_SNATIVELANGNAME 0x00000004 // native name of language
  370. #define LOCALE_ICOUNTRY 0x00000005 // country code
  371. #define LOCALE_SCOUNTRY 0x00000006 // localized name of country
  372. #define LOCALE_SENGCOUNTRY 0x00001002 // English name of country
  373. #define LOCALE_SABBREVCTRYNAME 0x00000007 // abbreviated country name
  374. #define LOCALE_SNATIVECTRYNAME 0x00000008 // native name of country
  375. #define LOCALE_IGEOID 0x0000005B // geographical location id ;internal_NT
  376. #define LOCALE_IDEFAULTLANGUAGE 0x00000009 // default language id
  377. #define LOCALE_IDEFAULTCOUNTRY 0x0000000A // default country code
  378. #define LOCALE_IDEFAULTCODEPAGE 0x0000000B // default oem code page
  379. #define LOCALE_IDEFAULTANSICODEPAGE 0x00001004 // default ansi code page
  380. #define LOCALE_IDEFAULTMACCODEPAGE 0x00001011 // default mac code page
  381. #define LOCALE_SLIST 0x0000000C // list item separator
  382. #define LOCALE_IMEASURE 0x0000000D // 0 = metric, 1 = US
  383. #define LOCALE_SDECIMAL 0x0000000E // decimal separator
  384. #define LOCALE_STHOUSAND 0x0000000F // thousand separator
  385. #define LOCALE_SGROUPING 0x00000010 // digit grouping
  386. #define LOCALE_IDIGITS 0x00000011 // number of fractional digits
  387. #define LOCALE_ILZERO 0x00000012 // leading zeros for decimal
  388. #define LOCALE_INEGNUMBER 0x00001010 // negative number mode
  389. #define LOCALE_SNATIVEDIGITS 0x00000013 // native ascii 0-9
  390. #define LOCALE_SCURRENCY 0x00000014 // local monetary symbol
  391. #define LOCALE_SINTLSYMBOL 0x00000015 // intl monetary symbol
  392. #define LOCALE_SMONDECIMALSEP 0x00000016 // monetary decimal separator
  393. #define LOCALE_SMONTHOUSANDSEP 0x00000017 // monetary thousand separator
  394. #define LOCALE_SMONGROUPING 0x00000018 // monetary grouping
  395. #define LOCALE_ICURRDIGITS 0x00000019 // # local monetary digits
  396. #define LOCALE_IINTLCURRDIGITS 0x0000001A // # intl monetary digits
  397. #define LOCALE_ICURRENCY 0x0000001B // positive currency mode
  398. #define LOCALE_INEGCURR 0x0000001C // negative currency mode
  399. #define LOCALE_SDATE 0x0000001D // date separator
  400. #define LOCALE_STIME 0x0000001E // time separator
  401. #define LOCALE_SSHORTDATE 0x0000001F // short date format string
  402. #define LOCALE_SLONGDATE 0x00000020 // long date format string
  403. #define LOCALE_STIMEFORMAT 0x00001003 // time format string
  404. #define LOCALE_IDATE 0x00000021 // short date format ordering
  405. #define LOCALE_ILDATE 0x00000022 // long date format ordering
  406. #define LOCALE_ITIME 0x00000023 // time format specifier
  407. #define LOCALE_ITIMEMARKPOSN 0x00001005 // time marker position
  408. #define LOCALE_ICENTURY 0x00000024 // century format specifier (short date)
  409. #define LOCALE_ITLZERO 0x00000025 // leading zeros in time field
  410. #define LOCALE_IDAYLZERO 0x00000026 // leading zeros in day field (short date)
  411. #define LOCALE_IMONLZERO 0x00000027 // leading zeros in month field (short date)
  412. #define LOCALE_S1159 0x00000028 // AM designator
  413. #define LOCALE_S2359 0x00000029 // PM designator
  414. #define LOCALE_ICALENDARTYPE 0x00001009 // type of calendar specifier
  415. #define LOCALE_IOPTIONALCALENDAR 0x0000100B // additional calendar types specifier
  416. #define LOCALE_IFIRSTDAYOFWEEK 0x0000100C // first day of week specifier
  417. #define LOCALE_IFIRSTWEEKOFYEAR 0x0000100D // first week of year specifier
  418. #define LOCALE_SDAYNAME1 0x0000002A // long name for Monday
  419. #define LOCALE_SDAYNAME2 0x0000002B // long name for Tuesday
  420. #define LOCALE_SDAYNAME3 0x0000002C // long name for Wednesday
  421. #define LOCALE_SDAYNAME4 0x0000002D // long name for Thursday
  422. #define LOCALE_SDAYNAME5 0x0000002E // long name for Friday
  423. #define LOCALE_SDAYNAME6 0x0000002F // long name for Saturday
  424. #define LOCALE_SDAYNAME7 0x00000030 // long name for Sunday
  425. #define LOCALE_SABBREVDAYNAME1 0x00000031 // abbreviated name for Monday
  426. #define LOCALE_SABBREVDAYNAME2 0x00000032 // abbreviated name for Tuesday
  427. #define LOCALE_SABBREVDAYNAME3 0x00000033 // abbreviated name for Wednesday
  428. #define LOCALE_SABBREVDAYNAME4 0x00000034 // abbreviated name for Thursday
  429. #define LOCALE_SABBREVDAYNAME5 0x00000035 // abbreviated name for Friday
  430. #define LOCALE_SABBREVDAYNAME6 0x00000036 // abbreviated name for Saturday
  431. #define LOCALE_SABBREVDAYNAME7 0x00000037 // abbreviated name for Sunday
  432. #define LOCALE_SMONTHNAME1 0x00000038 // long name for January
  433. #define LOCALE_SMONTHNAME2 0x00000039 // long name for February
  434. #define LOCALE_SMONTHNAME3 0x0000003A // long name for March
  435. #define LOCALE_SMONTHNAME4 0x0000003B // long name for April
  436. #define LOCALE_SMONTHNAME5 0x0000003C // long name for May
  437. #define LOCALE_SMONTHNAME6 0x0000003D // long name for June
  438. #define LOCALE_SMONTHNAME7 0x0000003E // long name for July
  439. #define LOCALE_SMONTHNAME8 0x0000003F // long name for August
  440. #define LOCALE_SMONTHNAME9 0x00000040 // long name for September
  441. #define LOCALE_SMONTHNAME10 0x00000041 // long name for October
  442. #define LOCALE_SMONTHNAME11 0x00000042 // long name for November
  443. #define LOCALE_SMONTHNAME12 0x00000043 // long name for December
  444. #define LOCALE_SMONTHNAME13 0x0000100E // long name for 13th month (if exists)
  445. #define LOCALE_SABBREVMONTHNAME1 0x00000044 // abbreviated name for January
  446. #define LOCALE_SABBREVMONTHNAME2 0x00000045 // abbreviated name for February
  447. #define LOCALE_SABBREVMONTHNAME3 0x00000046 // abbreviated name for March
  448. #define LOCALE_SABBREVMONTHNAME4 0x00000047 // abbreviated name for April
  449. #define LOCALE_SABBREVMONTHNAME5 0x00000048 // abbreviated name for May
  450. #define LOCALE_SABBREVMONTHNAME6 0x00000049 // abbreviated name for June
  451. #define LOCALE_SABBREVMONTHNAME7 0x0000004A // abbreviated name for July
  452. #define LOCALE_SABBREVMONTHNAME8 0x0000004B // abbreviated name for August
  453. #define LOCALE_SABBREVMONTHNAME9 0x0000004C // abbreviated name for September
  454. #define LOCALE_SABBREVMONTHNAME10 0x0000004D // abbreviated name for October
  455. #define LOCALE_SABBREVMONTHNAME11 0x0000004E // abbreviated name for November
  456. #define LOCALE_SABBREVMONTHNAME12 0x0000004F // abbreviated name for December
  457. #define LOCALE_SABBREVMONTHNAME13 0x0000100F // abbreviated name for 13th month (if exists)
  458. #define LOCALE_SPOSITIVESIGN 0x00000050 // positive sign
  459. #define LOCALE_SNEGATIVESIGN 0x00000051 // negative sign
  460. #define LOCALE_IPOSSIGNPOSN 0x00000052 // positive sign position
  461. #define LOCALE_INEGSIGNPOSN 0x00000053 // negative sign position
  462. #define LOCALE_IPOSSYMPRECEDES 0x00000054 // mon sym precedes pos amt
  463. #define LOCALE_IPOSSEPBYSPACE 0x00000055 // mon sym sep by space from pos amt
  464. #define LOCALE_INEGSYMPRECEDES 0x00000056 // mon sym precedes neg amt
  465. #define LOCALE_INEGSEPBYSPACE 0x00000057 // mon sym sep by space from neg amt
  466. ;begin_winver_400
  467. #define LOCALE_FONTSIGNATURE 0x00000058 // font signature
  468. #define LOCALE_SISO639LANGNAME 0x00000059 // ISO abbreviated language name
  469. #define LOCALE_SISO3166CTRYNAME 0x0000005A // ISO abbreviated country name
  470. ;end_winver_400
  471. ;begin_winver_500
  472. #define LOCALE_IDEFAULTEBCDICCODEPAGE 0x00001012 // default ebcdic code page
  473. #define LOCALE_IPAPERSIZE 0x0000100A // 1 = letter, 5 = legal, 8 = a3, 9 = a4
  474. #define LOCALE_SENGCURRNAME 0x00001007 // english name of currency
  475. #define LOCALE_SNATIVECURRNAME 0x00001008 // native name of currency
  476. #define LOCALE_SYEARMONTH 0x00001006 // year month format string
  477. #define LOCALE_SSORTNAME 0x00001013 // sort name
  478. #define LOCALE_IDIGITSUBSTITUTION 0x00001014 // 0 = context, 1 = none, 2 = national
  479. // ;internal_NT
  480. // LCType to represent the registry locale value ;internal_NT
  481. // ;internal_NT
  482. #define LOCALE_SLOCALE (-1) ;internal_NT
  483. ;end_winver_500
  484. //
  485. // Time Flags for GetTimeFormat.
  486. //
  487. #define TIME_NOMINUTESORSECONDS 0x00000001 // do not use minutes or seconds
  488. #define TIME_NOSECONDS 0x00000002 // do not use seconds
  489. #define TIME_NOTIMEMARKER 0x00000004 // do not use time marker
  490. #define TIME_FORCE24HOURFORMAT 0x00000008 // always use 24 hour format
  491. //
  492. // Date Flags for GetDateFormat.
  493. //
  494. #define DATE_SHORTDATE 0x00000001 // use short date picture
  495. #define DATE_LONGDATE 0x00000002 // use long date picture
  496. #define DATE_USE_ALT_CALENDAR 0x00000004 // use alternate calendar (if any)
  497. ;begin_winver_500
  498. #define DATE_YEARMONTH 0x00000008 // use year month picture
  499. #define DATE_LTRREADING 0x00000010 // add marks for left to right reading order layout
  500. #define DATE_RTLREADING 0x00000020 // add marks for right to left reading order layout
  501. #define DATE_ADDHIJRIDATETEMP 0x80000000 // use AddHijriDateTemp reg value ;internal_NT
  502. ;end_winver_500
  503. //
  504. // Calendar Types.
  505. //
  506. // These types are used for the EnumCalendarInfo and GetCalendarInfo
  507. // NLS API routines.
  508. // Some of these types are also used for the SetCalendarInfo NLS API
  509. // routine.
  510. //
  511. //
  512. // The following CalTypes may be used in combination with any other CalTypes.
  513. //
  514. // CAL_NOUSEROVERRIDE
  515. //
  516. // CAL_USE_CP_ACP is used in the A (Ansi) apis that need to do string
  517. // translation.
  518. //
  519. // CAL_RETURN_NUMBER will return the result from GetCalendarInfo as a
  520. // number instead of a string. This flag is only valid for the CalTypes
  521. // beginning with CAL_I.
  522. //
  523. ;begin_winver_500
  524. #define CAL_NOUSEROVERRIDE LOCALE_NOUSEROVERRIDE // do not use user overrides
  525. #define CAL_USE_CP_ACP LOCALE_USE_CP_ACP // use the system ACP
  526. #define CAL_RETURN_NUMBER LOCALE_RETURN_NUMBER // return number instead of string
  527. ;end_winver_400
  528. //
  529. // The following CalTypes are mutually exclusive in that they may NOT
  530. // be used in combination with each other.
  531. //
  532. #define CAL_ICALINTVALUE 0x00000001 // calendar type
  533. #define CAL_SCALNAME 0x00000002 // native name of calendar
  534. #define CAL_IYEAROFFSETRANGE 0x00000003 // starting years of eras
  535. #define CAL_SERASTRING 0x00000004 // era name for IYearOffsetRanges
  536. #define CAL_SSHORTDATE 0x00000005 // short date format string
  537. #define CAL_SLONGDATE 0x00000006 // long date format string
  538. #define CAL_SDAYNAME1 0x00000007 // native name for Monday
  539. #define CAL_SDAYNAME2 0x00000008 // native name for Tuesday
  540. #define CAL_SDAYNAME3 0x00000009 // native name for Wednesday
  541. #define CAL_SDAYNAME4 0x0000000a // native name for Thursday
  542. #define CAL_SDAYNAME5 0x0000000b // native name for Friday
  543. #define CAL_SDAYNAME6 0x0000000c // native name for Saturday
  544. #define CAL_SDAYNAME7 0x0000000d // native name for Sunday
  545. #define CAL_SABBREVDAYNAME1 0x0000000e // abbreviated name for Monday
  546. #define CAL_SABBREVDAYNAME2 0x0000000f // abbreviated name for Tuesday
  547. #define CAL_SABBREVDAYNAME3 0x00000010 // abbreviated name for Wednesday
  548. #define CAL_SABBREVDAYNAME4 0x00000011 // abbreviated name for Thursday
  549. #define CAL_SABBREVDAYNAME5 0x00000012 // abbreviated name for Friday
  550. #define CAL_SABBREVDAYNAME6 0x00000013 // abbreviated name for Saturday
  551. #define CAL_SABBREVDAYNAME7 0x00000014 // abbreviated name for Sunday
  552. #define CAL_SMONTHNAME1 0x00000015 // native name for January
  553. #define CAL_SMONTHNAME2 0x00000016 // native name for February
  554. #define CAL_SMONTHNAME3 0x00000017 // native name for March
  555. #define CAL_SMONTHNAME4 0x00000018 // native name for April
  556. #define CAL_SMONTHNAME5 0x00000019 // native name for May
  557. #define CAL_SMONTHNAME6 0x0000001a // native name for June
  558. #define CAL_SMONTHNAME7 0x0000001b // native name for July
  559. #define CAL_SMONTHNAME8 0x0000001c // native name for August
  560. #define CAL_SMONTHNAME9 0x0000001d // native name for September
  561. #define CAL_SMONTHNAME10 0x0000001e // native name for October
  562. #define CAL_SMONTHNAME11 0x0000001f // native name for November
  563. #define CAL_SMONTHNAME12 0x00000020 // native name for December
  564. #define CAL_SMONTHNAME13 0x00000021 // native name for 13th month (if any)
  565. #define CAL_SABBREVMONTHNAME1 0x00000022 // abbreviated name for January
  566. #define CAL_SABBREVMONTHNAME2 0x00000023 // abbreviated name for February
  567. #define CAL_SABBREVMONTHNAME3 0x00000024 // abbreviated name for March
  568. #define CAL_SABBREVMONTHNAME4 0x00000025 // abbreviated name for April
  569. #define CAL_SABBREVMONTHNAME5 0x00000026 // abbreviated name for May
  570. #define CAL_SABBREVMONTHNAME6 0x00000027 // abbreviated name for June
  571. #define CAL_SABBREVMONTHNAME7 0x00000028 // abbreviated name for July
  572. #define CAL_SABBREVMONTHNAME8 0x00000029 // abbreviated name for August
  573. #define CAL_SABBREVMONTHNAME9 0x0000002a // abbreviated name for September
  574. #define CAL_SABBREVMONTHNAME10 0x0000002b // abbreviated name for October
  575. #define CAL_SABBREVMONTHNAME11 0x0000002c // abbreviated name for November
  576. #define CAL_SABBREVMONTHNAME12 0x0000002d // abbreviated name for December
  577. #define CAL_SABBREVMONTHNAME13 0x0000002e // abbreviated name for 13th month (if any)
  578. ;begin_winver_500
  579. #define CAL_SYEARMONTH 0x0000002f // year month format string
  580. #define CAL_ITWODIGITYEARMAX 0x00000030 // two digit year max
  581. ;end_winver_500
  582. //
  583. // Calendar Enumeration Value.
  584. //
  585. #define ENUM_ALL_CALENDARS 0xffffffff // enumerate all calendars
  586. //
  587. // Calendar ID Values.
  588. //
  589. #define CAL_GREGORIAN 1 // Gregorian (localized) calendar
  590. #define CAL_GREGORIAN_US 2 // Gregorian (U.S.) calendar
  591. #define CAL_JAPAN 3 // Japanese Emperor Era calendar
  592. #define CAL_TAIWAN 4 // Taiwan calendar
  593. #define CAL_KOREA 5 // Korean Tangun Era calendar
  594. #define CAL_HIJRI 6 // Hijri (Arabic Lunar) calendar
  595. #define CAL_THAI 7 // Thai calendar
  596. #define CAL_HEBREW 8 // Hebrew (Lunar) calendar
  597. #define CAL_GREGORIAN_ME_FRENCH 9 // Gregorian Middle East French calendar
  598. #define CAL_GREGORIAN_ARABIC 10 // Gregorian Arabic calendar
  599. #define CAL_GREGORIAN_XLIT_ENGLISH 11 // Gregorian Transliterated English calendar
  600. #define CAL_GREGORIAN_XLIT_FRENCH 12 // Gregorian Transliterated French calendar
  601. //
  602. // Language Group ID Values.
  603. //
  604. #define LGRPID_WESTERN_EUROPE 0x0001 // Western Europe & U.S.
  605. #define LGRPID_CENTRAL_EUROPE 0x0002 // Central Europe
  606. #define LGRPID_BALTIC 0x0003 // Baltic
  607. #define LGRPID_GREEK 0x0004 // Greek
  608. #define LGRPID_CYRILLIC 0x0005 // Cyrillic
  609. #define LGRPID_TURKISH 0x0006 // Turkish
  610. #define LGRPID_JAPANESE 0x0007 // Japanese
  611. #define LGRPID_KOREAN 0x0008 // Korean
  612. #define LGRPID_TRADITIONAL_CHINESE 0x0009 // Traditional Chinese
  613. #define LGRPID_SIMPLIFIED_CHINESE 0x000a // Simplified Chinese
  614. #define LGRPID_THAI 0x000b // Thai
  615. #define LGRPID_HEBREW 0x000c // Hebrew
  616. #define LGRPID_ARABIC 0x000d // Arabic
  617. #define LGRPID_VIETNAMESE 0x000e // Vietnamese
  618. #define LGRPID_INDIC 0x000f // Indic
  619. #define LGRPID_GEORGIAN 0x0010 // Georgian
  620. #define LGRPID_ARMENIAN 0x0011 // Armenian
  621. ////////////////////////////////////////////////////////////////////////////
  622. //
  623. // Typedefs
  624. //
  625. // Define all types for the NLS component here.
  626. //
  627. ////////////////////////////////////////////////////////////////////////////
  628. //
  629. // Language Group ID.
  630. //
  631. typedef DWORD LGRPID;
  632. //
  633. // Locale type constant.
  634. //
  635. typedef DWORD LCTYPE;
  636. //
  637. // Calendar type constant.
  638. //
  639. typedef DWORD CALTYPE;
  640. //
  641. // Calendar ID.
  642. //
  643. typedef DWORD CALID;
  644. //
  645. // CP Info.
  646. //
  647. typedef struct _cpinfo {
  648. UINT MaxCharSize; // max length (in bytes) of a char
  649. BYTE DefaultChar[MAX_DEFAULTCHAR]; // default character
  650. BYTE LeadByte[MAX_LEADBYTES]; // lead byte ranges
  651. } CPINFO, *LPCPINFO;
  652. typedef struct _cpinfoex% {
  653. UINT MaxCharSize; // max length (in bytes) of a char
  654. BYTE DefaultChar[MAX_DEFAULTCHAR]; // default character (MB)
  655. BYTE LeadByte[MAX_LEADBYTES]; // lead byte ranges
  656. WCHAR UnicodeDefaultChar; // default character (Unicode)
  657. UINT CodePage; // code page id
  658. TCHAR% CodePageName[MAX_PATH]; // code page name (Unicode)
  659. } CPINFOEX%, *LPCPINFOEX%;
  660. //
  661. // Number format.
  662. //
  663. typedef struct _numberfmt% {
  664. UINT NumDigits; // number of decimal digits
  665. UINT LeadingZero; // if leading zero in decimal fields
  666. UINT Grouping; // group size left of decimal
  667. LPTSTR% lpDecimalSep; // ptr to decimal separator string
  668. LPTSTR% lpThousandSep; // ptr to thousand separator string
  669. UINT NegativeOrder; // negative number ordering
  670. } NUMBERFMT%, *LPNUMBERFMT%;
  671. //
  672. // Currency format.
  673. //
  674. typedef struct _currencyfmt% {
  675. UINT NumDigits; // number of decimal digits
  676. UINT LeadingZero; // if leading zero in decimal fields
  677. UINT Grouping; // group size left of decimal
  678. LPTSTR% lpDecimalSep; // ptr to decimal separator string
  679. LPTSTR% lpThousandSep; // ptr to thousand separator string
  680. UINT NegativeOrder; // negative currency ordering
  681. UINT PositiveOrder; // positive currency ordering
  682. LPTSTR% lpCurrencySymbol; // ptr to currency symbol string
  683. } CURRENCYFMT%, *LPCURRENCYFMT%;
  684. //
  685. // GEO defines
  686. //
  687. typedef LONG GEOID;
  688. typedef DWORD GEOTYPE;
  689. typedef DWORD GEOCLASS;
  690. #define GEOID_NOT_AVAILABLE -1
  691. //
  692. // GEO information types for clients to query
  693. //
  694. enum SYSGEOTYPE {
  695. GEO_NATION = 0x0001,
  696. GEO_LATITUDE = 0x0002,
  697. GEO_LONGITUDE = 0x0003,
  698. GEO_ISO2 = 0x0004,
  699. GEO_ISO3 = 0x0005,
  700. GEO_RFC1766 = 0x0006,
  701. GEO_LCID = 0x0007,
  702. GEO_FRIENDLYNAME= 0x0008,
  703. GEO_OFFICIALNAME= 0x0009,
  704. GEO_TIMEZONES = 0x000A,
  705. GEO_OFFICIALLANGUAGES = 0x000B,
  706. };
  707. //
  708. // More GEOCLASS defines will be listed here
  709. //
  710. enum SYSGEOCLASS {
  711. GEOCLASS_NATION = 16,
  712. GEOCLASS_REGION = 14,
  713. };
  714. //
  715. // Enumeration function constants.
  716. //
  717. #ifdef STRICT
  718. typedef BOOL (CALLBACK* LANGUAGEGROUP_ENUMPROCA)(LGRPID, LPSTR, LPSTR, DWORD, LONG_PTR);
  719. typedef BOOL (CALLBACK* LANGGROUPLOCALE_ENUMPROCA)(LGRPID, LCID, LPSTR, LONG_PTR);
  720. typedef BOOL (CALLBACK* UILANGUAGE_ENUMPROCA)(LPSTR, LONG_PTR);
  721. typedef BOOL (CALLBACK* LOCALE_ENUMPROCA)(LPSTR);
  722. typedef BOOL (CALLBACK* CODEPAGE_ENUMPROCA)(LPSTR);
  723. typedef BOOL (CALLBACK* DATEFMT_ENUMPROCA)(LPSTR);
  724. typedef BOOL (CALLBACK* DATEFMT_ENUMPROCEXA)(LPSTR, CALID);
  725. typedef BOOL (CALLBACK* TIMEFMT_ENUMPROCA)(LPSTR);
  726. typedef BOOL (CALLBACK* CALINFO_ENUMPROCA)(LPSTR);
  727. typedef BOOL (CALLBACK* CALINFO_ENUMPROCEXA)(LPSTR, CALID);
  728. typedef BOOL (CALLBACK* LANGUAGEGROUP_ENUMPROCW)(LGRPID, LPWSTR, LPWSTR, DWORD, LONG_PTR);
  729. typedef BOOL (CALLBACK* LANGGROUPLOCALE_ENUMPROCW)(LGRPID, LCID, LPWSTR, LONG_PTR);
  730. typedef BOOL (CALLBACK* UILANGUAGE_ENUMPROCW)(LPWSTR, LONG_PTR);
  731. typedef BOOL (CALLBACK* LOCALE_ENUMPROCW)(LPWSTR);
  732. typedef BOOL (CALLBACK* CODEPAGE_ENUMPROCW)(LPWSTR);
  733. typedef BOOL (CALLBACK* DATEFMT_ENUMPROCW)(LPWSTR);
  734. typedef BOOL (CALLBACK* DATEFMT_ENUMPROCEXW)(LPWSTR, CALID);
  735. typedef BOOL (CALLBACK* TIMEFMT_ENUMPROCW)(LPWSTR);
  736. typedef BOOL (CALLBACK* CALINFO_ENUMPROCW)(LPWSTR);
  737. typedef BOOL (CALLBACK* CALINFO_ENUMPROCEXW)(LPWSTR, CALID);
  738. typedef BOOL (CALLBACK* GEO_ENUMPROC)(GEOID);
  739. #else // !STRICT
  740. typedef FARPROC LANGUAGEGROUP_ENUMPROCA;
  741. typedef FARPROC LANGGROUPLOCALE_ENUMPROCA;
  742. typedef FARPROC UILANGUAGE_ENUMPROCA;
  743. typedef FARPROC LOCALE_ENUMPROCA;
  744. typedef FARPROC CODEPAGE_ENUMPROCA;
  745. typedef FARPROC DATEFMT_ENUMPROCA;
  746. typedef FARPROC DATEFMT_ENUMPROCEXA;
  747. typedef FARPROC TIMEFMT_ENUMPROCA;
  748. typedef FARPROC CALINFO_ENUMPROCA;
  749. typedef FARPROC CALINFO_ENUMPROCEXA;
  750. typedef FARPROC GEO_ENUMPROC;
  751. typedef FARPROC LANGUAGEGROUP_ENUMPROCW;
  752. typedef FARPROC LANGGROUPLOCALE_ENUMPROCW;
  753. typedef FARPROC UILANGUAGE_ENUMPROCW;
  754. typedef FARPROC LOCALE_ENUMPROCW;
  755. typedef FARPROC CODEPAGE_ENUMPROCW;
  756. typedef FARPROC DATEFMT_ENUMPROCW;
  757. typedef FARPROC DATEFMT_ENUMPROCEXW;
  758. typedef FARPROC TIMEFMT_ENUMPROCW;
  759. typedef FARPROC CALINFO_ENUMPROCW;
  760. typedef FARPROC CALINFO_ENUMPROCEXW;
  761. #endif // !STRICT
  762. #ifdef UNICODE
  763. #define LANGUAGEGROUP_ENUMPROC LANGUAGEGROUP_ENUMPROCW
  764. #define LANGGROUPLOCALE_ENUMPROC LANGGROUPLOCALE_ENUMPROCW
  765. #define UILANGUAGE_ENUMPROC UILANGUAGE_ENUMPROCW
  766. #define LOCALE_ENUMPROC LOCALE_ENUMPROCW
  767. #define CODEPAGE_ENUMPROC CODEPAGE_ENUMPROCW
  768. #define DATEFMT_ENUMPROC DATEFMT_ENUMPROCW
  769. #define DATEFMT_ENUMPROCEX DATEFMT_ENUMPROCEXW
  770. #define TIMEFMT_ENUMPROC TIMEFMT_ENUMPROCW
  771. #define CALINFO_ENUMPROC CALINFO_ENUMPROCW
  772. #define CALINFO_ENUMPROCEX CALINFO_ENUMPROCEXW
  773. #else
  774. #define LANGUAGEGROUP_ENUMPROC LANGUAGEGROUP_ENUMPROCA
  775. #define LANGGROUPLOCALE_ENUMPROC LANGGROUPLOCALE_ENUMPROCA
  776. #define UILANGUAGE_ENUMPROC UILANGUAGE_ENUMPROCA
  777. #define LOCALE_ENUMPROC LOCALE_ENUMPROCA
  778. #define CODEPAGE_ENUMPROC CODEPAGE_ENUMPROCA
  779. #define DATEFMT_ENUMPROC DATEFMT_ENUMPROCA
  780. #define DATEFMT_ENUMPROCEX DATEFMT_ENUMPROCEXA
  781. #define TIMEFMT_ENUMPROC TIMEFMT_ENUMPROCA
  782. #define CALINFO_ENUMPROC CALINFO_ENUMPROCA
  783. #define CALINFO_ENUMPROCEX CALINFO_ENUMPROCEXA
  784. #endif // !UNICODE
  785. ////////////////////////////////////////////////////////////////////////////
  786. //
  787. // Macros
  788. //
  789. // Define all macros for the NLS component here.
  790. //
  791. ////////////////////////////////////////////////////////////////////////////
  792. ////////////////////////////////////////////////////////////////////////////
  793. //
  794. // Function Prototypes
  795. //
  796. // Only prototypes for the NLS APIs should go here.
  797. //
  798. ////////////////////////////////////////////////////////////////////////////
  799. //
  800. // Code Page Dependent APIs.
  801. //
  802. WINBASEAPI
  803. BOOL
  804. WINAPI
  805. IsValidCodePage(
  806. IN UINT CodePage);
  807. WINBASEAPI
  808. UINT
  809. WINAPI
  810. GetACP(void);
  811. WINBASEAPI
  812. UINT
  813. WINAPI
  814. GetOEMCP(void);
  815. WINBASEAPI
  816. BOOL
  817. WINAPI
  818. GetCPInfo(
  819. IN UINT CodePage,
  820. OUT LPCPINFO lpCPInfo);
  821. WINBASEAPI
  822. BOOL
  823. WINAPI
  824. GetCPInfoEx%(
  825. IN UINT CodePage,
  826. IN DWORD dwFlags,
  827. OUT LPCPINFOEX% lpCPInfoEx);
  828. WINBASEAPI
  829. BOOL
  830. WINAPI
  831. IsDBCSLeadByte(
  832. IN BYTE TestChar);
  833. WINBASEAPI
  834. BOOL
  835. WINAPI
  836. IsDBCSLeadByteEx(
  837. IN UINT CodePage,
  838. IN BYTE TestChar);
  839. WINBASEAPI
  840. int
  841. WINAPI
  842. MultiByteToWideChar(
  843. IN UINT CodePage,
  844. IN DWORD dwFlags,
  845. IN LPCSTR lpMultiByteStr,
  846. IN int cbMultiByte,
  847. OUT LPWSTR lpWideCharStr,
  848. IN int cchWideChar);
  849. WINBASEAPI
  850. int
  851. WINAPI
  852. WideCharToMultiByte(
  853. IN UINT CodePage,
  854. IN DWORD dwFlags,
  855. IN LPCWSTR lpWideCharStr,
  856. IN int cchWideChar,
  857. OUT LPSTR lpMultiByteStr,
  858. IN int cbMultiByte,
  859. IN LPCSTR lpDefaultChar,
  860. OUT LPBOOL lpUsedDefaultChar);
  861. //
  862. // Locale Dependent APIs.
  863. //
  864. WINBASEAPI
  865. int
  866. WINAPI
  867. CompareString%(
  868. IN LCID Locale,
  869. IN DWORD dwCmpFlags,
  870. IN LPCTSTR% lpString1,
  871. IN int cchCount1,
  872. IN LPCTSTR% lpString2,
  873. IN int cchCount2);
  874. WINBASEAPI
  875. int
  876. WINAPI
  877. LCMapString%(
  878. IN LCID Locale,
  879. IN DWORD dwMapFlags,
  880. IN LPCTSTR% lpSrcStr,
  881. IN int cchSrc,
  882. OUT LPTSTR% lpDestStr,
  883. IN int cchDest);
  884. WINBASEAPI
  885. int
  886. WINAPI
  887. GetLocaleInfo%(
  888. IN LCID Locale,
  889. IN LCTYPE LCType,
  890. OUT LPTSTR% lpLCData,
  891. IN int cchData);
  892. WINBASEAPI
  893. BOOL
  894. WINAPI
  895. SetLocaleInfo%(
  896. IN LCID Locale,
  897. IN LCTYPE LCType,
  898. IN LPCTSTR% lpLCData);
  899. #if (WINVER >= 0x040A)
  900. WINBASEAPI
  901. int
  902. WINAPI
  903. GetCalendarInfo%(
  904. LCID Locale,
  905. CALID Calendar,
  906. CALTYPE CalType,
  907. LPTSTR% lpCalData,
  908. int cchData,
  909. LPDWORD lpValue);
  910. WINBASEAPI
  911. BOOL
  912. WINAPI
  913. SetCalendarInfo%(
  914. LCID Locale,
  915. CALID Calendar,
  916. CALTYPE CalType,
  917. LPCTSTR% lpCalData);
  918. #endif
  919. WINBASEAPI
  920. int
  921. WINAPI
  922. GetTimeFormat%(
  923. IN LCID Locale,
  924. IN DWORD dwFlags,
  925. IN CONST SYSTEMTIME *lpTime,
  926. IN LPCTSTR% lpFormat,
  927. OUT LPTSTR% lpTimeStr,
  928. IN int cchTime);
  929. WINBASEAPI
  930. int
  931. WINAPI
  932. GetDateFormat%(
  933. IN LCID Locale,
  934. IN DWORD dwFlags,
  935. IN CONST SYSTEMTIME *lpDate,
  936. IN LPCTSTR% lpFormat,
  937. OUT LPTSTR% lpDateStr,
  938. IN int cchDate);
  939. WINBASEAPI
  940. int
  941. WINAPI
  942. GetNumberFormat%(
  943. IN LCID Locale,
  944. IN DWORD dwFlags,
  945. IN LPCTSTR% lpValue,
  946. IN CONST NUMBERFMT% *lpFormat,
  947. OUT LPTSTR% lpNumberStr,
  948. IN int cchNumber);
  949. WINBASEAPI
  950. int
  951. WINAPI
  952. GetCurrencyFormat%(
  953. IN LCID Locale,
  954. IN DWORD dwFlags,
  955. IN LPCTSTR% lpValue,
  956. IN CONST CURRENCYFMT% *lpFormat,
  957. OUT LPTSTR% lpCurrencyStr,
  958. IN int cchCurrency);
  959. WINBASEAPI
  960. BOOL
  961. WINAPI
  962. EnumCalendarInfo%(
  963. IN CALINFO_ENUMPROC% lpCalInfoEnumProc,
  964. IN LCID Locale,
  965. IN CALID Calendar,
  966. IN CALTYPE CalType);
  967. ;begin_winver_500
  968. WINBASEAPI
  969. BOOL
  970. WINAPI
  971. EnumCalendarInfoEx%(
  972. IN CALINFO_ENUMPROCEX% lpCalInfoEnumProcEx,
  973. IN LCID Locale,
  974. IN CALID Calendar,
  975. IN CALTYPE CalType);
  976. ;end_winver_500
  977. WINBASEAPI
  978. BOOL
  979. WINAPI
  980. EnumTimeFormats%(
  981. IN TIMEFMT_ENUMPROC% lpTimeFmtEnumProc,
  982. IN LCID Locale,
  983. IN DWORD dwFlags);
  984. WINBASEAPI
  985. BOOL
  986. WINAPI
  987. EnumDateFormats%(
  988. IN DATEFMT_ENUMPROC% lpDateFmtEnumProc,
  989. IN LCID Locale,
  990. IN DWORD dwFlags);
  991. ;begin_winver_500
  992. WINBASEAPI
  993. BOOL
  994. WINAPI
  995. EnumDateFormatsEx%(
  996. IN DATEFMT_ENUMPROCEX% lpDateFmtEnumProcEx,
  997. IN LCID Locale,
  998. IN DWORD dwFlags);
  999. ;end_winver_500
  1000. ;begin_winver_500
  1001. WINBASEAPI
  1002. BOOL
  1003. WINAPI
  1004. IsValidLanguageGroup(
  1005. IN LGRPID LanguageGroup,
  1006. IN DWORD dwFlags);
  1007. ;end_winver_500
  1008. WINBASEAPI
  1009. BOOL
  1010. WINAPI
  1011. IsValidLocale(
  1012. IN LCID Locale,
  1013. IN DWORD dwFlags);
  1014. WINBASEAPI
  1015. int
  1016. WINAPI
  1017. GetGeoInfo%(
  1018. GEOID Location,
  1019. GEOTYPE GeoType,
  1020. LPTSTR% lpGeoData,
  1021. int cchData,
  1022. LANGID LangId);
  1023. WINBASEAPI
  1024. BOOL
  1025. WINAPI
  1026. EnumSystemGeoID(
  1027. GEOCLASS GeoClass,
  1028. GEOID ParentGeoId,
  1029. GEO_ENUMPROC lpGeoEnumProc);
  1030. WINBASEAPI
  1031. GEOID
  1032. WINAPI
  1033. GetUserGeoID(
  1034. GEOCLASS GeoClass);
  1035. WINBASEAPI
  1036. BOOL
  1037. WINAPI
  1038. SetUserGeoID(
  1039. GEOID GeoId);
  1040. WINBASEAPI
  1041. LCID
  1042. WINAPI
  1043. ConvertDefaultLocale(
  1044. IN OUT LCID Locale);
  1045. WINBASEAPI
  1046. LCID
  1047. WINAPI
  1048. GetThreadLocale(void);
  1049. WINBASEAPI
  1050. BOOL
  1051. WINAPI
  1052. SetThreadLocale(
  1053. IN LCID Locale
  1054. );
  1055. ;begin_winver_500
  1056. WINBASEAPI
  1057. LANGID
  1058. WINAPI
  1059. GetSystemDefaultUILanguage(void);
  1060. WINBASEAPI
  1061. LANGID
  1062. WINAPI
  1063. GetUserDefaultUILanguage(void);
  1064. ;end_winver_500
  1065. WINBASEAPI
  1066. LANGID
  1067. WINAPI
  1068. GetSystemDefaultLangID(void);
  1069. WINBASEAPI
  1070. LANGID
  1071. WINAPI
  1072. GetUserDefaultLangID(void);
  1073. WINBASEAPI
  1074. LCID
  1075. WINAPI
  1076. GetSystemDefaultLCID(void);
  1077. WINBASEAPI
  1078. LCID
  1079. WINAPI
  1080. GetUserDefaultLCID(void);
  1081. WINBASEAPI ;internal_win40
  1082. BOOL ;internal_win40
  1083. WINAPI ;internal_win40
  1084. InvalidateNLSCache(void); ;internal_win40
  1085. ;internal_win40
  1086. // ;internal_NT
  1087. // This private API is only called by the Complex Script ;internal_NT
  1088. // Language Pack (CSLPK). ;internal_NT
  1089. // ;internal_NT
  1090. ULONG ;internal_NT
  1091. WINAPI NlsGetCacheUpdateCount(void); ;internal_NT
  1092. ;internal_NT
  1093. // ;internal_NT
  1094. // This API is called only from intl.cpl when the user ;internal_NT
  1095. // locale changes. ;internal_NT
  1096. // ;internal_NT
  1097. void ;internal_NT
  1098. WINAPI ;internal_NT
  1099. NlsResetProcessLocale(void); ;internal_NT
  1100. // ;internal_NT
  1101. // This API is called by system console Apps ;internal_NT
  1102. // ;internal_NT
  1103. LANGID ;internal_NT
  1104. WINAPI ;internal_NT
  1105. SetThreadUILanguage(WORD wReserved); ;internal_NT
  1106. // ;internal_NT
  1107. // This API can be used to verify if a UI language is installed.;internal_NT
  1108. // ;internal_NT
  1109. BOOL ;internal_NT
  1110. WINAPI ;internal_NT
  1111. IsValidUILanguage(LANGID UILangID); ;internal_NT
  1112. //
  1113. // Locale Independent APIs.
  1114. //
  1115. WINBASEAPI
  1116. BOOL
  1117. WINAPI
  1118. GetStringTypeEx%(
  1119. IN LCID Locale,
  1120. IN DWORD dwInfoType,
  1121. IN LPCTSTR% lpSrcStr,
  1122. IN int cchSrc,
  1123. OUT LPWORD lpCharType);
  1124. //
  1125. // NOTE: The parameters for GetStringTypeA and GetStringTypeW are
  1126. // NOT the same. The W version was shipped in NT 3.1. The
  1127. // A version was then shipped in 16-bit OLE with the wrong
  1128. // parameters (ported from Win95). To be compatible, we
  1129. // must break the relationship between the A and W versions
  1130. // of GetStringType. There will be NO function call for the
  1131. // generic GetStringType.
  1132. //
  1133. // GetStringTypeEx (above) should be used instead.
  1134. //
  1135. WINBASEAPI
  1136. BOOL
  1137. WINAPI
  1138. GetStringTypeA(
  1139. IN LCID Locale,
  1140. IN DWORD dwInfoType,
  1141. IN LPCSTR lpSrcStr,
  1142. IN int cchSrc,
  1143. OUT LPWORD lpCharType);
  1144. WINBASEAPI
  1145. BOOL
  1146. WINAPI
  1147. GetStringTypeW(
  1148. IN DWORD dwInfoType,
  1149. IN LPCWSTR lpSrcStr,
  1150. IN int cchSrc,
  1151. OUT LPWORD lpCharType);
  1152. WINBASEAPI
  1153. int
  1154. WINAPI
  1155. FoldString%(
  1156. IN DWORD dwMapFlags,
  1157. IN LPCTSTR% lpSrcStr,
  1158. IN int cchSrc,
  1159. OUT LPTSTR% lpDestStr,
  1160. IN int cchDest);
  1161. ;begin_winver_500
  1162. WINBASEAPI
  1163. BOOL
  1164. WINAPI
  1165. EnumSystemLanguageGroups%(
  1166. IN LANGUAGEGROUP_ENUMPROC% lpLanguageGroupEnumProc,
  1167. IN DWORD dwFlags,
  1168. IN LONG_PTR lParam);
  1169. WINBASEAPI
  1170. BOOL
  1171. WINAPI
  1172. EnumLanguageGroupLocales%(
  1173. IN LANGGROUPLOCALE_ENUMPROC% lpLangGroupLocaleEnumProc,
  1174. IN LGRPID LanguageGroup,
  1175. IN DWORD dwFlags,
  1176. IN LONG_PTR lParam);
  1177. WINBASEAPI
  1178. BOOL
  1179. WINAPI
  1180. EnumUILanguages%(
  1181. IN UILANGUAGE_ENUMPROC% lpUILanguageEnumProc,
  1182. IN DWORD dwFlags,
  1183. IN LONG_PTR lParam);
  1184. ;end_winver_500
  1185. WINBASEAPI
  1186. BOOL
  1187. WINAPI
  1188. EnumSystemLocales%(
  1189. IN LOCALE_ENUMPROC% lpLocaleEnumProc,
  1190. IN DWORD dwFlags);
  1191. WINBASEAPI
  1192. BOOL
  1193. WINAPI
  1194. EnumSystemCodePages%(
  1195. IN CODEPAGE_ENUMPROC% lpCodePageEnumProc,
  1196. IN DWORD dwFlags);
  1197. ;begin_internal_NT
  1198. //
  1199. // These definitions are used by both winnls and base\server
  1200. //
  1201. //
  1202. // Names of Registry Value Entries.
  1203. //
  1204. #define NLS_VALUE_ACP L"ACP"
  1205. #define NLS_VALUE_OEMCP L"OEMCP"
  1206. #define NLS_VALUE_MACCP L"MACCP"
  1207. #define NLS_VALUE_DEFAULT L"Default"
  1208. // User Info
  1209. #define NLS_VALUE_LOCALE L"Locale"
  1210. #define NLS_VALUE_SLANGUAGE L"sLanguage"
  1211. #define NLS_VALUE_ICOUNTRY L"iCountry"
  1212. #define NLS_VALUE_SCOUNTRY L"sCountry"
  1213. #define NLS_VALUE_SLIST L"sList"
  1214. #define NLS_VALUE_IMEASURE L"iMeasure"
  1215. #define NLS_VALUE_IPAPERSIZE L"iPaperSize"
  1216. #define NLS_VALUE_SDECIMAL L"sDecimal"
  1217. #define NLS_VALUE_STHOUSAND L"sThousand"
  1218. #define NLS_VALUE_SGROUPING L"sGrouping"
  1219. #define NLS_VALUE_IDIGITS L"iDigits"
  1220. #define NLS_VALUE_ILZERO L"iLZero"
  1221. #define NLS_VALUE_INEGNUMBER L"iNegNumber"
  1222. #define NLS_VALUE_SNATIVEDIGITS L"sNativeDigits"
  1223. #define NLS_VALUE_IDIGITSUBST L"NumShape"
  1224. #define NLS_VALUE_SCURRENCY L"sCurrency"
  1225. #define NLS_VALUE_SMONDECIMALSEP L"sMonDecimalSep"
  1226. #define NLS_VALUE_SMONTHOUSANDSEP L"sMonThousandSep"
  1227. #define NLS_VALUE_SMONGROUPING L"sMonGrouping"
  1228. #define NLS_VALUE_ICURRDIGITS L"iCurrDigits"
  1229. #define NLS_VALUE_ICURRENCY L"iCurrency"
  1230. #define NLS_VALUE_INEGCURR L"iNegCurr"
  1231. #define NLS_VALUE_SPOSITIVESIGN L"sPositiveSign"
  1232. #define NLS_VALUE_SNEGATIVESIGN L"sNegativeSign"
  1233. #define NLS_VALUE_STIMEFORMAT L"sTimeFormat"
  1234. #define NLS_VALUE_STIME L"sTime"
  1235. #define NLS_VALUE_ITIME L"iTime"
  1236. #define NLS_VALUE_ITLZERO L"iTLZero"
  1237. #define NLS_VALUE_ITIMEMARKPOSN L"iTimePrefix"
  1238. #define NLS_VALUE_S1159 L"s1159"
  1239. #define NLS_VALUE_S2359 L"s2359"
  1240. #define NLS_VALUE_SSHORTDATE L"sShortDate"
  1241. #define NLS_VALUE_SDATE L"sDate"
  1242. #define NLS_VALUE_IDATE L"iDate"
  1243. #define NLS_VALUE_SYEARMONTH L"sYearMonth"
  1244. #define NLS_VALUE_SLONGDATE L"sLongDate"
  1245. #define NLS_VALUE_ICALENDARTYPE L"iCalendarType"
  1246. #define NLS_VALUE_IFIRSTDAYOFWEEK L"iFirstDayOfWeek"
  1247. #define NLS_VALUE_IFIRSTWEEKOFYEAR L"iFirstWeekOfYear"
  1248. //
  1249. // String constants for CreateSection/OpenSection name string.
  1250. //
  1251. #define NLS_SECTION_CPPREFIX L"\\NLS\\NlsSectionCP"
  1252. #define NLS_SECTION_LANGPREFIX L"\\NLS\\NlsSectionLANG"
  1253. #define NLS_SECTION_UNICODE L"\\NLS\\NlsSectionUnicode"
  1254. #define NLS_SECTION_LOCALE L"\\NLS\\NlsSectionLocale"
  1255. #define NLS_SECTION_CTYPE L"\\NLS\\NlsSectionCType"
  1256. #define NLS_SECTION_SORTKEY L"\\NLS\\NlsSectionSortkey"
  1257. #define NLS_SECTION_SORTTBLS L"\\NLS\\NlsSectionSortTbls"
  1258. #define NLS_SECTION_LANG_INTL L"\\NLS\\NlsSectionLANG_INTL"
  1259. #define NLS_SECTION_LANG_EXCEPT L"\\NLS\\NlsSectionLANG_EXCEPT"
  1260. #define NLS_SECTION_GEO L"\\NLS\\NlsSectionGeo"
  1261. //
  1262. // Unicode file names.
  1263. // These files will always be installed by setup in the system directory,
  1264. // so there is no need to put these names in the registry.
  1265. //
  1266. #define NLS_FILE_UNICODE L"unicode.nls"
  1267. #define NLS_FILE_LOCALE L"locale.nls"
  1268. #define NLS_FILE_CTYPE L"ctype.nls"
  1269. #define NLS_FILE_SORTKEY L"sortkey.nls"
  1270. #define NLS_FILE_SORTTBLS L"sorttbls.nls"
  1271. #define NLS_FILE_LANG_INTL L"l_intl.nls"
  1272. #define NLS_FILE_LANG_EXCEPT L"l_except.nls"
  1273. #define NLS_FILE_GEO L"geo.nls"
  1274. //
  1275. // Default file names if registry is corrupt.
  1276. //
  1277. #define NLS_DEFAULT_FILE_ACP L"c_1252.nls"
  1278. #define NLS_DEFAULT_FILE_OEMCP L"c_437.nls"
  1279. //
  1280. // Default section names if registry is corrupt.
  1281. //
  1282. #define NLS_DEFAULT_SECTION_ACP L"\\NLS\\NlsSectionCP1252"
  1283. #define NLS_DEFAULT_SECTION_OEMCP L"\\NLS\\NlsSectionCP437"
  1284. #ifdef _WINDOWS_BASE
  1285. //
  1286. // winnls routines that are called from base\server. The prototypes must
  1287. // continue to match the typedefs.
  1288. //
  1289. typedef ULONG
  1290. (*PNLS_CONVERT_INTEGER_TO_STRING)(
  1291. UINT Value,
  1292. UINT Base,
  1293. UINT Padding,
  1294. LPWSTR pResultBuf,
  1295. UINT Size);
  1296. ULONG
  1297. NlsConvertIntegerToString(
  1298. UINT Value,
  1299. UINT Base,
  1300. UINT Padding,
  1301. LPWSTR pResultBuf,
  1302. UINT Size);
  1303. typedef BOOL
  1304. (*PGET_CP_FILE_NAME_FROM_REGISTRY)(
  1305. UINT CodePage,
  1306. LPWSTR pResultBuf,
  1307. UINT Size);
  1308. BOOL
  1309. GetCPFileNameFromRegistry(
  1310. UINT CodePage,
  1311. LPWSTR pResultBuf,
  1312. UINT Size);
  1313. typedef ULONG
  1314. (*PCREATE_NLS_SECURITY_DESCRIPTOR)(
  1315. PSECURITY_DESCRIPTOR pSecurityDescriptor,
  1316. UINT SecurityDescriptorSize,
  1317. ACCESS_MASK AccessMask);
  1318. ULONG
  1319. CreateNlsSecurityDescriptor(
  1320. PSECURITY_DESCRIPTOR pSecurityDescriptor,
  1321. UINT SecurityDescriptorSize,
  1322. ACCESS_MASK AccessMask);
  1323. typedef ULONG
  1324. (*PGET_NLS_SECTION_NAME)(
  1325. UINT Value,
  1326. UINT Base,
  1327. UINT Padding,
  1328. LPWSTR pwszPrefix,
  1329. LPWSTR pwszSecName,
  1330. UINT cchSecName);
  1331. ULONG
  1332. GetNlsSectionName(
  1333. UINT Value,
  1334. UINT Base,
  1335. UINT Padding,
  1336. LPWSTR pwszPrefix,
  1337. LPWSTR pwszSecName,
  1338. UINT cchSecName);
  1339. typedef WINBASEAPI BOOL
  1340. (WINAPI *PIS_VALID_CODEPAGE)(
  1341. UINT CodePage);
  1342. WINBASEAPI BOOL WINAPI
  1343. IsValidCodePage(
  1344. UINT CodePage);
  1345. typedef ULONG
  1346. (*POPEN_DATA_FILE)(HANDLE *phFile, LPWSTR pFile);
  1347. ULONG OpenDataFile(HANDLE *phFile, LPWSTR pFile);
  1348. typedef ULONG
  1349. (*PGET_DEFAULT_SORTKEY_SIZE)(PLARGE_INTEGER pSize);
  1350. ULONG GetDefaultSortkeySize(PLARGE_INTEGER pSize);
  1351. typedef ULONG
  1352. (*PGET_LINGUIST_LANG_SIZE)(PLARGE_INTEGER pSize);
  1353. ULONG GetLinguistLangSize(PLARGE_INTEGER pSize);
  1354. typedef BOOL
  1355. (*PVALIDATE_LOCALE)(LCID Locale);
  1356. BOOL ValidateLocale(LCID Locale);
  1357. typedef BOOL
  1358. (*PVALIDATE_LCTYPE)(PVOID pInfo, LCTYPE LCType, LPWSTR *ppwReg, LPWSTR *ppwCache);
  1359. BOOL ValidateLCType(PNLS_USER_INFO pInfo, LCTYPE LCType, LPWSTR *ppwReg, LPWSTR *ppwCache);
  1360. typedef BOOL
  1361. (*PNLS_LOAD_STRING_EX_W)(HMODULE hModule, UINT wID, LPWSTR lpBuffer, int cchBufferMax, WORD wLangId);
  1362. int NlsLoadStringExW(HMODULE hModule, UINT wID, LPWSTR lpBuffer, int cchBufferMax, WORD wLangId);
  1363. #endif // _WINDOWS_BASE
  1364. ;end_internal_NT
  1365. #endif // NONLS
  1366. #ifdef __cplusplus ;both
  1367. } ;both
  1368. #endif ;both
  1369. ;both
  1370. #endif // _WINNLS_
  1371. #endif // _WINNLSP_ ;internal_NT