|
GetStringTypeA
(LCID, dwInfoType, lpSrcStr, cchSrc, lpCharType)
LCID LCID
DWORD dwInfoType
LPCSTR lpSrcStr
int cchSrc
LPWORD lpCharType
Parameters
LCID
Locale context for the mapping. The string is assumed to be represented in the
default ANSI code page for this locale.
dwInfoType
Type of character information to retrieve. The various types are divided into
different levels (see Comments for a list of the information included in each
type). The options are mutually exclusive. The following types are supported:
- CT_CTYPE1
- CT_CTYPE2
- CT_CTYPE3
lpSrcStr
String for which character types are requested. If cchSrc is 1, lpSrcStr is assumed to be null-terminated.
cchSrc
Character count of lpSrcStr. If cchSrc is 1, lpSrcStr is assumed to be null-terminated. Note that this must also be the character
count of lpCharType.
lpCharType
Array of the same length as lpSrcStr (cchSrc). On output, the array contains one word corresponding to each character in lpSrcStr.
Return Value
Value
| Meaning
| 0
| Failure
| -
| Success
|
Comments
The lpSrcStr and lpCharType pointers may not be the same; in this case the error ERROR_INVALID_PARAMETER results.
The character type bits are divided up into several levels. One level's
information can be retrieved by a single call.
This function supports three character types:
Ctype 1 types support ANSI C and POSIX character typing functions. A bitwise OR of
these values is returned when dwInfoType is set to CT_CTYPE1. For DBCS locales, the Ctype 1 attributes apply to both
the narrow characters and the wide characters. The Japanese hiragana and
katakana characters, and the kanji ideograph characters all have the C1_ALPHA
attribute.
The following table lists the Ctype 1 character types.
Name
| Value
| Meaning
| C1_UPPER
| - x0001
| Uppercase1
| C1_LOWER
| - x0002
| Lowercase1
| C1_DIGIT
| 0x0004
| Decimal digits
| C1_SPACE
| 0x0008
| Space characters
| C1_PUNCT
| 0x0010
| Punctuation
| C1_CNTRL
| 0x0020
| Control characters
| C1_BLANK
| 0x0040
| Blank characters
| C1_XDIGIT
| 0x0080
| Hexadecimal digits
| C1_ALPHA
| 0x0100
| Any letter
|
- The Windows version 3.1 functions IsCharUpper and IsCharLower do not always produce correct results for characters in the range 0x80-0x9f,
so they may produce different results than this function for characters in that
range. (For example, the German Windows version 3.1 language driver
incorrectly reports 0x9a, lowercase s hacek, as uppercase).
|
|
Ctype 2 types support the proper layout of text. For DBCS locales, Ctype 2 applies to
both narrow and wide characters. The directional attributes are assigned so
that the BiDi layout algorithm standardized by Unicode produces the correct
results. See The Unicode Standard: Worldwide Character Encoding from Addison-Wesley for more information on the use of these attributes.
| Name
| Value
| Meaning
| Strong
| C2_LEFTTORIGHT
| - x1
| Left to right
|
| C2_RIGHTTOLEFT
| - x2
| Right to left
| Weak
| C2_EUROPENUMBER
| - x3
| European number, European digit
|
| C2_EUROPESEPARATOR
| - x4
| European numeric separator
|
| C2_EUROPETERMINATOR
| - x5
| European numeric terminator
|
| C2_ARABICNUMBER
| - x6
| Arabic number
|
| C2_COMMONSEPARATOR
| - x7
| Common numeric separator
| Neutral
| C2_BLOCKSEPARATOR
| - x8
| Block separator
|
| C2_SEGMENTSEPARATOR
| - x9
| Segment separator
|
| C2_WHITESPACE
| - xA
| White space
|
| C2_OTHERNEUTRAL
| - xB
| Other neutrals
| Not applicable
| C2_NOTAPPLICABLE
| 0x0
| No implicit direction (for example, control codes)
|
Ctype 3 types are general text-processing information. A bitwise OR of these values is
returned when dwInfoType is set to CT_CTYPE3. For DBCS locales, the Ctype 3 attributes apply to both
the narrow characters and the wide characters. The Japanese hiragana and
katakana characters and the kanji ideograph characters all have the C3_ALPHA attribute.
Name
| Value
| Meaning
| C3_NONSPACING
| - x1
| Nonspacing mark
| C3_DIACRITIC
| - x2
| Diacritic nonspacing mark
| C3_VOWELMARK
| 0x4
| Vowel nonspacing mark
| C3_SYMBOL
| 0x8
| Symbol
| C3_KATAKANA
| 0x10
| Katakana character
| C3_HIRAGANA
| 0x20
| Hiragana character
| C3_HALFWIDTH
| 0x40
| Narrow character
| C3_FULLWIDTH
| 0x80
| Wide character
| C3_IDEOGRAPH
| 0x100
| Ideograph
| C3_ALPHA
| 0x8000
| Any letter
| C3_NOTAPPLICABLE
| 0x0
| Not applicable
|
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|