GetStringTypeEx (Windows Embedded CE 6.0)
This function returns character-type information for the characters in the specified source string. For each character in the string, GetStringTypeEx sets one or more bits in the corresponding 16-bit element of the output array. Each bit identifies a given character type, such as whether the character is a letter, a digit, or neither.
BOOL GetStringTypeEx( LCID Locale, DWORD dwInfoType, LPCTSTR lpSrcStr, int cchSrc, LPWORD lpCharType );
[in] Value that specifies the locale identifier. This value uniquely defines the ANSI code page to use to translate the string pointed to by lpSrcStr from ANSI to Unicode. The function then analyzes each Unicode character for character type information
This parameter can be a locale identifier created by the MAKELCID macro, or one of the following predefined values. The following table shows the values this parameter can take.
Default system locale.
Default user locale.
For Windows CE 1.0, Locale is ignored.
[in] Value that specifies the type of character information the user wants to retrieve. The various types are divided into different levels (see the following Remarks section for a list of the information included in each type). This parameter can specify one of the following character type flags. The following table shows the values this parameter can take.
Retrieve character type information.
Retrieve bidirectional layout information.
Retrieve text-processing information.
[in] Pointer to the string for which character types are requested. If cchSrc is –1, the string is assumed to be null terminated.
[in] Size, in characters, of the string pointed to by the lpSrcStr parameter. If this count includes a terminating null character, the function returns character type information for the terminating null character. If this value is –1, the string is assumed to be null terminated and the length is calculated automatically.
[out] Pointer to an array of 16-bit values. The length of this array must be large enough to receive one 16-bit value for each character in the source string. When the function returns, this array contains one word corresponding to each character in the source string.
Nonzero indicates success. Zero indicates failure. To get extended error information, call the GetLastError function. Possible values for GetLastError include the following:
Windows Embedded CE supports only the Unicode version of GetStringTypeEx, which ignores the Locale parameter.
The lpSrcStr and lpCharType pointers must not be the same. If they are the same, the function fails and GetLastError returns ERROR_INVALID_PARAMETER.
The character-type bits are divided into several levels. The information for one level can be retrieved by a single call to this function. Each level is limited to 16 bits of information so that the other mapping routines, which are limited to 16 bits of representation per character, can also return character-type information.
The character types supported by this function include the following.
- Ctype 1
These types support ANSI C and POSIX (LC_CTYPE) character-typing functions. A combination of these values is returned in the array pointed to by the lpCharType parameter when the dwInfoType parameter is set to CT_CTYPE1.
Name Value Description
Any linguistic character: alphabetic, syllabary, or ideographic
The following character types are either constant or computable from basic types and do not need to be supported by this function.
Alphabetic characters and digits (C1_ALPHA and C1_DIGIT)
Graphic characters and blank (all C1_* types except C1_CNTRL)
- Ctype 2
These types support proper layout of Unicode text. The direction attributes are assigned so that the bidirectional layout algorithm standardized by Unicode produces accurate results. These types are mutually exclusive.
Name Value Description
Left to right
Right to left
European number, European digit
European numeric separator
European numeric terminator
Common numeric separator
No implicit directionality (for example, control codes)
- Ctype 3
These types are intended to be placeholders for extensions to the POSIX types required for general text processing or for the standard C library functions. A combination of these values is returned when dwInfoType is set to CT_CTYPE3.
Name Value Description
Diacritic nonspacing mark
Vowel nonspacing mark
Arabic Kashida character
Punctuation which is counted as part of the word (Kashida, hyphen, feminine/masculine ordinal indicators, equal sign, and so forth)
All linguistic characters (alphabetic, syllabary, and ideographic)