Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than kernel32, prefix the name with the module name and a period.
Private Declare Unicode Function GetStringTypeEx Lib "kernel32" Alias "GetStringTypeExW" ( _
ByVal Locale As Int32, ByVal dwInfoType As Int32, _
ByVal lpSrcStr As String, ByVal cchSrc As Int32, _
ByRef lpCharType As Int16) As Boolean
User-Defined Types:
None.
Notes:
None.
Tips & Tricks:
Please add some!
Sample Code:
Public Const CT_TYPE1 As Int32 = &H1 ' Retrieves character type info
Public Const CT_TYPE2 As Int32 = &H2 ' Retrieves bi-directional layout info
Public Const CT_TYPE3 As Int32 = &H4 ' Retrieves text processing info
Public Enum CharTypeInfo As Integer
AnsiPosix = CT_TYPE1
BidirectionalLayout = CT_TYPE2
TextProcessing = CT_TYPE3
End Enum
Public Function GetStringTypeEx(ByVal str As String, ByVal cti As CharTypeInfo) As Int16()
Dim APIRetVal As Boolean
Dim CharTypeInfoArray(Len(str) - 1) As Int16
' No need to specify the Locale, the Unicode (W) version of GetStringTypeEx ignores it anyway
APIRetVal = GetStringTypeEx(0, cti, str, Len(str), CharTypeInfoArray(0))
If (Not APIRetVal) Then
Throw New ApplicationException("GetStringTypeExError")
End If
Return CharTypeInfoArray
End Function
Alternative Managed API:
Do you know one? Please contribute it!
The GetStringTypeEx API returns character information for the characters in the specified string pointer. Three types of character information can be retrieved, depending on the dwInfoType parameter.
3/16/2007 7:55:33 AM - -65.82.123.169
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).