Private Declare Function GetStringTypeW Lib "Kernel32" (ByVal InfoType As Long, Text As Byte, ByVal Length As Long, Types As Integer) As Long
...
Dim S As String, B() As Byte, C() As Integer, L as Long
L = Len(S)
ReDim C(1 To L)
B = S
If GetStringTypeW(1, B(0), L, C(1)) Then
'Character classes are in C.
Else
'Something went wrong. Deal with it or call Err.Raise.
End If