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