winnls.h
来自「用于查询PC机上的USB端口是否有设备挂接上」· C头文件 代码 · 共 1,656 行 · 第 1/4 页
H
1,656 行
/**************************************************************************
* *
* winnls.h -- NLS procedure declarations, constant definitions and macros *
* *
* Copyright (c) 1991-1999, Microsoft Corp. All rights reserved. *
* *
**************************************************************************/
#ifndef _WINNLS_
#define _WINNLS_
#ifdef __cplusplus
extern "C" {
#endif
#ifndef NONLS
/***************************************************************************\
* Constants
*
* Define all constants for the NLS component here.
\***************************************************************************/
/*
* String Length Maximums.
*/
#define MAX_LEADBYTES 12 /* 5 ranges, 2 bytes ea., 0 term. */
#define MAX_DEFAULTCHAR 2 /* single or double byte */
/*
* MBCS and Unicode Translation Flags.
*/
#define MB_PRECOMPOSED 0x00000001 /* use precomposed chars */
#define MB_COMPOSITE 0x00000002 /* use composite chars */
#define MB_USEGLYPHCHARS 0x00000004 /* use glyph chars, not ctrl chars */
#define MB_ERR_INVALID_CHARS 0x00000008 /* error for invalid chars */
#define WC_COMPOSITECHECK 0x00000200 /* convert composite to precomposed */
#define WC_DISCARDNS 0x00000010 /* discard non-spacing chars */
#define WC_SEPCHARS 0x00000020 /* generate separate chars */
#define WC_DEFAULTCHAR 0x00000040 /* replace w/ default char */
#if(WINVER >= 0x040a)
#define WC_NO_BEST_FIT_CHARS 0x00000400 // do not use best fit chars
#endif /* WINVER >= 0x040a */
//
// Flags for DLL Code Page Translation Function.
//
#define NLS_CP_CPINFO 0x10000000
#define NLS_CP_CPINFOEX 0x20000000
#define NLS_CP_MBTOWC 0x40000000
#define NLS_CP_WCTOMB 0x80000000
/*
* Character Type Flags.
*/
#define CT_CTYPE1 0x00000001 /* ctype 1 information */
#define CT_CTYPE2 0x00000002 /* ctype 2 information */
#define CT_CTYPE3 0x00000004 /* ctype 3 information */
/*
* CType 1 Flag Bits.
*/
#define C1_UPPER 0x0001 /* upper case */
#define C1_LOWER 0x0002 /* lower case */
#define C1_DIGIT 0x0004 /* decimal digits */
#define C1_SPACE 0x0008 /* spacing characters */
#define C1_PUNCT 0x0010 /* punctuation characters */
#define C1_CNTRL 0x0020 /* control characters */
#define C1_BLANK 0x0040 /* blank characters */
#define C1_XDIGIT 0x0080 /* other digits */
#define C1_ALPHA 0x0100 /* any linguistic character */
/*
* CType 2 Flag Bits.
*/
#define C2_LEFTTORIGHT 0x0001 /* left to right */
#define C2_RIGHTTOLEFT 0x0002 /* right to left */
#define C2_EUROPENUMBER 0x0003 /* European number, digit */
#define C2_EUROPESEPARATOR 0x0004 /* European numeric separator */
#define C2_EUROPETERMINATOR 0x0005 /* European numeric terminator */
#define C2_ARABICNUMBER 0x0006 /* Arabic number */
#define C2_COMMONSEPARATOR 0x0007 /* common numeric separator */
#define C2_BLOCKSEPARATOR 0x0008 /* block separator */
#define C2_SEGMENTSEPARATOR 0x0009 /* segment separator */
#define C2_WHITESPACE 0x000A /* white space */
#define C2_OTHERNEUTRAL 0x000B /* other neutrals */
#define C2_NOTAPPLICABLE 0x0000 /* no implicit directionality */
/*
* CType 3 Flag Bits.
*/
#define C3_NONSPACING 0x0001 /* nonspacing character */
#define C3_DIACRITIC 0x0002 /* diacritic mark */
#define C3_VOWELMARK 0x0004 /* vowel mark */
#define C3_SYMBOL 0x0008 /* symbols */
#define C3_KATAKANA 0x0010 /* katakana character */
#define C3_HIRAGANA 0x0020 /* hiragana character */
#define C3_HALFWIDTH 0x0040 /* half width character */
#define C3_FULLWIDTH 0x0080 /* full width character */
#define C3_IDEOGRAPH 0x0100 /* ideographic character */
#define C3_KASHIDA 0x0200 /* Arabic kashida character */
#define C3_LEXICAL 0x0400 /* lexical character */
#define C3_ALPHA 0x8000 /* any linguistic char (C1_ALPHA) */
#define C3_NOTAPPLICABLE 0x0000 /* ctype 3 is not applicable */
/*
* String Flags.
*/
#define NORM_IGNORECASE 0x00000001 /* ignore case */
#define NORM_IGNORENONSPACE 0x00000002 /* ignore nonspacing chars */
#define NORM_IGNORESYMBOLS 0x00000004 /* ignore symbols */
#define NORM_IGNOREKANATYPE 0x00010000 /* ignore kanatype */
#define NORM_IGNOREWIDTH 0x00020000 /* ignore width */
/*
* Locale Independent Mapping Flags.
*/
#define MAP_FOLDCZONE 0x00000010 /* fold compatibility zone chars */
#define MAP_PRECOMPOSED 0x00000020 /* convert to precomposed chars */
#define MAP_COMPOSITE 0x00000040 /* convert to composite chars */
#define MAP_FOLDDIGITS 0x00000080 /* all digits to ASCII 0-9 */
#if(WINVER >= 0x040a)
#define MAP_EXPAND_LIGATURES 0x00002000 // expand all ligatures
#endif /* WINVER >= 0x040a */
/*
* Locale Dependent Mapping Flags.
*/
#define LCMAP_LOWERCASE 0x00000100 /* lower case letters */
#define LCMAP_UPPERCASE 0x00000200 /* upper case letters */
#define LCMAP_SORTKEY 0x00000400 /* WC sort key (normalize) */
#define LCMAP_BYTEREV 0x00000800 /* byte reversal */
#define LCMAP_HIRAGANA 0x00100000 /* map katakana to hiragana */
#define LCMAP_KATAKANA 0x00200000 /* map hiragana to katakana */
#define LCMAP_HALFWIDTH 0x00400000 /* map double byte to single byte */
#define LCMAP_FULLWIDTH 0x00800000 /* map single byte to double byte */
#define LCMAP_LINGUISTIC_CASING 0x01000000 // use linguistic rules for casing
#define LCMAP_SIMPLIFIED_CHINESE 0x02000000 // map traditional chinese to simplified chinese
#define LCMAP_TRADITIONAL_CHINESE 0x04000000 // map simplified chinese to traditional chinese
//begin_winver_500
#if(WINVER >= 0x040a)
//
// Language Group Enumeration Flags.
//
#define LGRPID_INSTALLED 0x00000001 // installed language group ids
#define LGRPID_SUPPORTED 0x00000002 // supported language group ids
#endif /* WINVER >= 0x040a */
//;end_winver_500
/*
* Locale Enumeration Flags.
*/
#define LCID_INSTALLED 0x00000001 /* installed locale ids */
#define LCID_SUPPORTED 0x00000002 /* supported locale ids */
#define LCID_ALTERNATE_SORTS 0x00000004 // alternate sort locale ids
/*
* Code Page Enumeration Flags.
*/
#define CP_INSTALLED 0x00000001 /* installed code page ids */
#define CP_SUPPORTED 0x00000002 /* supported code page ids */
/*
* Sorting Flags.
*
* WORD Sort: culturally correct sort
* hyphen and apostrophe are special cased
* example: "coop" and "co-op" will sort together in a list
*
* co_op <------- underscore (symbol)
* coat
* comb
* coop
* co-op <------- hyphen (punctuation)
* cork
* went
* were
* we're <------- apostrophe (punctuation)
*
*
* STRING Sort: hyphen and apostrophe will sort with all other symbols
*
* co-op <------- hyphen (punctuation)
* co_op <------- underscore (symbol)
* coat
* comb
* coop
* cork
* we're <------- apostrophe (punctuation)
* went
* were
*/
#define SORT_STRINGSORT 0x00001000 /* use string sort method */
//
// Compare String Return Values.
//
#define CSTR_LESS_THAN 1 // string 1 less than string 2
#define CSTR_EQUAL 2 // string 1 equal to string 2
#define CSTR_GREATER_THAN 3 // string 1 greater than string 2
/*
* Code Page Default Values.
*/
#define CP_ACP 0 // default to ANSI code page
#define CP_OEMCP 1 // default to OEM code page
#define CP_MACCP 2 // default to MAC code page
//begin_winver_500
#if(WINVER >= 0x040a)
#define CP_THREAD_ACP 3 // current thread's ANSI code page
#define CP_SYMBOL 42 // SYMBOL translations
#endif /* WINVER >= 0x040a */
//;end_winver_500
#define CP_UTF7 65000 // UTF-7 translation
#define CP_UTF8 65001 // UTF-8 translation
/*
* Country Codes.
*/
#define CTRY_DEFAULT 0
#define CTRY_ALBANIA 355 // Albania
#define CTRY_ALGERIA 213 // Algeria
#define CTRY_ARGENTINA 54 // Argentina
#define CTRY_ARMENIA 374 // Armenia
#define CTRY_AUSTRALIA 61 // Australia
#define CTRY_AUSTRIA 43 // Austria
#define CTRY_AZERBAIJAN 994 // Azerbaijan
#define CTRY_BAHRAIN 973 // Bahrain
#define CTRY_BELARUS 375 // Belarus
#define CTRY_BELGIUM 32 // Belgium
#define CTRY_BELIZE 501 // Belize
#define CTRY_BOLIVIA 591 // Bolivia
#define CTRY_BRAZIL 55 // Brazil
#define CTRY_BRUNEI_DARUSSALAM 673 // Brunei Darussalam
#define CTRY_BULGARIA 359 // Bulgaria
#define CTRY_CANADA 2 // Canada
#define CTRY_CARIBBEAN 1 // Caribbean
#define CTRY_CHILE 56 // Chile
#define CTRY_COLOMBIA 57 // Colombia
#define CTRY_COSTA_RICA 506 // Costa Rica
#define CTRY_CROATIA 385 // Croatia
#define CTRY_CZECH 420 // Czech Republic
#define CTRY_DENMARK 45 // Denmark
#define CTRY_DOMINICAN_REPUBLIC 1 // Dominican Republic
#define CTRY_ECUADOR 593 // Ecuador
#define CTRY_EGYPT 20 // Egypt
#define CTRY_EL_SALVADOR 503 // El Salvador
#define CTRY_ESTONIA 372 // Estonia
#define CTRY_FAEROE_ISLANDS 298 // Faeroe Islands
#define CTRY_FINLAND 358 // Finland
#define CTRY_FRANCE 33 // France
#define CTRY_GEORGIA 995 // Georgia
#define CTRY_GERMANY 49 // Germany
#define CTRY_GREECE 30 // Greece
#define CTRY_GUATEMALA 502 // Guatemala
#define CTRY_HONDURAS 504 // Honduras
#define CTRY_HONG_KONG 852 // Hong Kong
#define CTRY_HUNGARY 36 // Hungary
#define CTRY_ICELAND 354 // Iceland
#define CTRY_INDIA 91 // India
#define CTRY_INDONESIA 62 // Indonesia
#define CTRY_IRAN 981 // Iran
#define CTRY_IRAQ 964 // Iraq
#define CTRY_IRELAND 353 // Ireland
#define CTRY_ISRAEL 972 // Israel
#define CTRY_ITALY 39 // Italy
#define CTRY_JAMAICA 1 // Jamaica
#define CTRY_JAPAN 81 // Japan
#define CTRY_JORDAN 962 // Jordan
#define CTRY_KAZAKSTAN 7 // Kazakstan
#define CTRY_KENYA 254 // Kenya
#define CTRY_KUWAIT 965 // Kuwait
#define CTRY_LATVIA 371 // Latvia
#define CTRY_LEBANON 961 // Lebanon
#define CTRY_LIBYA 218 // Libya
#define CTRY_LIECHTENSTEIN 41 // Liechtenstein
#define CTRY_LITHUANIA 370 // Lithuania
#define CTRY_LUXEMBOURG 352 // Luxembourg
#define CTRY_MACAU 853 // Macau
#define CTRY_MACEDONIA 389 // Republic of Macedonia
#define CTRY_MALAYSIA 60 // Malaysia
#define CTRY_MEXICO 52 // Mexico
#define CTRY_MONACO 33 // Principality of Monaco
#define CTRY_MOROCCO 212 // Morocco
#define CTRY_NETHERLANDS 31 // Netherlands
#define CTRY_NEW_ZEALAND 64 // New Zealand
#define CTRY_NICARAGUA 505 // Nicaragua
#define CTRY_NORWAY 47 // Norway
#define CTRY_OMAN 968 // Oman
#define CTRY_PAKISTAN 92 // Islamic Republic of Pakistan
#define CTRY_PANAMA 507 // Panama
#define CTRY_PARAGUAY 595 // Paraguay
#define CTRY_PERU 51 // Peru
#define CTRY_PHILIPPINES 63 // Republic of the Philippines
#define CTRY_POLAND 48 // Poland
#define CTRY_PORTUGAL 351 // Portugal
#define CTRY_PRCHINA 86 // People's Republic of China
#define CTRY_PUERTO_RICO 1 // Puerto Rico
#define CTRY_QATAR 974 // Qatar
#define CTRY_ROMANIA 40 // Romania
#define CTRY_RUSSIA 7 // Russia
#define CTRY_SAUDI_ARABIA 966 // Saudi Arabia
#define CTRY_SERBIA 381 // Serbia
#define CTRY_SINGAPORE 65 // Singapore
#define CTRY_SLOVAK 421 // Slovak Republic
#define CTRY_SLOVENIA 386 // Slovenia
#define CTRY_SOUTH_AFRICA 27 // South Africa
#define CTRY_SOUTH_KOREA 82 // South Korea
#define CTRY_SPAIN 34 // Spain
#define CTRY_SWEDEN 46 // Sweden
#define CTRY_SWITZERLAND 41 // Switzerland
#define CTRY_SYRIA 963 // Syria
#define CTRY_TAIWAN 886 // Taiwan Region
#define CTRY_TATARSTAN 7 // Tatarstan
#define CTRY_THAILAND 66 // Thailand
#define CTRY_TRINIDAD_Y_TOBAGO 1 // Trinidad y Tobago
#define CTRY_TUNISIA 216 // Tunisia
#define CTRY_TURKEY 90 // Turkey
#define CTRY_UAE 971 // U.A.E.
#define CTRY_UKRAINE 380 // Ukraine
#define CTRY_UNITED_KINGDOM 44 // United Kingdom
#define CTRY_UNITED_STATES 1 // United States
#define CTRY_URUGUAY 598 // Uruguay
#define CTRY_UZBEKISTAN 7 // Uzbekistan
#define CTRY_VENEZUELA 58 // Venezuela
#define CTRY_VIET_NAM 84 // Viet Nam
#define CTRY_YEMEN 967 // Yemen
#define CTRY_ZIMBABWE 263 // Zimbabwe
//
// Locale Types.
//
// These types are used for the GetLocaleInfo NLS API routine.
// Some of these types are also used for the SetLocaleInfo NLS API routine.
//
//
// The following LCTypes may be used in combination with any other LCTypes.
//
// LOCALE_NOUSEROVERRIDE is also used in GetTimeFormat and
// GetDateFormat.
//
// LOCALE_USE_CP_ACP is used in many of the A (Ansi) apis that need
// to do string translation.
//
// LOCALE_RETURN_NUMBER will return the result from GetLocaleInfo as a
// number instead of a string. This flag is only valid for the LCTypes
// beginning with LOCALE_I.
//
#define LOCALE_NOUSEROVERRIDE 0x80000000 /* do not use user overrides */
#define LOCALE_USE_CP_ACP 0x40000000 /* use the system ACP */
#if(WINVER >= 0x040a)
#define LOCALE_RETURN_NUMBER 0x20000000 // return number instead of string
#endif /* WINVER >= 0x040a */
//
// The following LCTypes are mutually exclusive in that they may NOT
// be used in combination with each other.
//
#define LOCALE_ILANGUAGE 0x00000001 /* language id */
#define LOCALE_SLANGUAGE 0x00000002 /* localized name of language */
#define LOCALE_SENGLANGUAGE 0x00001001 /* English name of language */
#define LOCALE_SABBREVLANGNAME 0x00000003 /* abbreviated language name */
#define LOCALE_SNATIVELANGNAME 0x00000004 /* native name of language */
#define LOCALE_ICOUNTRY 0x00000005 /* country code */
#define LOCALE_SCOUNTRY 0x00000006 /* localized name of country */
#define LOCALE_SENGCOUNTRY 0x00001002 /* English name of country */
#define LOCALE_SABBREVCTRYNAME 0x00000007 /* abbreviated country name */
#define LOCALE_SNATIVECTRYNAME 0x00000008 /* native name of country */
#define LOCALE_IDEFAULTLANGUAGE 0x00000009 /* default language id */
#define LOCALE_IDEFAULTCOUNTRY 0x0000000A /* default country code */
#define LOCALE_IDEFAULTCODEPAGE 0x0000000B /* default oem code page */
#define LOCALE_IDEFAULTANSICODEPAGE 0x00001004 /* default ansi code page */
#define LOCALE_IDEFAULTMACCODEPAGE 0x00001011 // default mac code page
#define LOCALE_SLIST 0x0000000C /* list item separator */
#define LOCALE_IMEASURE 0x0000000D /* 0 = metric, 1 = US */
#define LOCALE_SDECIMAL 0x0000000E /* decimal separator */
#define LOCALE_STHOUSAND 0x0000000F /* thousand separator */
#define LOCALE_SGROUPING 0x00000010 /* digit grouping */
#define LOCALE_IDIGITS 0x00000011 /* number of fractional digits */
#define LOCALE_ILZERO 0x00000012 /* leading zeros for decimal */
#define LOCALE_INEGNUMBER 0x00001010 /* negative number mode */
#define LOCALE_SNATIVEDIGITS 0x00000013 /* native ascii 0-9 */
#define LOCALE_SCURRENCY 0x00000014 /* local monetary symbol */
#define LOCALE_SINTLSYMBOL 0x00000015 /* intl monetary symbol */
#define LOCALE_SMONDECIMALSEP 0x00000016 /* monetary decimal separator */
#define LOCALE_SMONTHOUSANDSEP 0x00000017 /* monetary thousand separator */
#define LOCALE_SMONGROUPING 0x00000018 /* monetary grouping */
#define LOCALE_ICURRDIGITS 0x00000019 /* # local monetary digits */
#define LOCALE_IINTLCURRDIGITS 0x0000001A /* # intl monetary digits */
#define LOCALE_ICURRENCY 0x0000001B /* positive currency mode */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?