home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / winnls.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  48KB  |  1,383 lines

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