AllApi.net

[an error occurred while processing this directive]
 
Private Declare Function GetThreadLocale Lib "KERNEL32" () As Long
Private Declare Function CompareString Lib "kernel32.dll" Alias "CompareStringA" (ByVal Locale As Long, ByVal dwCmpFlags As Long, ByVal lpString1 As String, ByVal cchCount1 As Long, ByVal lpString2 As String, ByVal cchCount2 As Long) As Long
Const CSTR_LESS_THAN = 1
Const CSTR_EQUAL = 2
Const CSTR_GREATER_THAN = 3
Const LOCALE_SYSTEM_DEFAULT = &H400
Const LOCALE_USER_DEFAULT = &H800
Const NORM_IGNORECASE = &H1
Const NORM_IGNOREKANATYPE = &H10000
Const NORM_IGNORENONSPACE = &H2
Const NORM_IGNORESYMBOLS = &H4
Const NORM_IGNOREWIDTH = &H20000
Const SORT_STRINGSORT = &H1000
Private Sub Form_Load()
    'KPD-Team 2000
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    Dim hTL As Long
    'get the calling thread's current locale
    hTL = GetThreadLocale()
    'compare
    Const Str1 As String = "Hello"
    Const Str2 As String = "hellO"
    Select Case CompareString(hTL, NORM_IGNORECASE, Str1, Len(Str1), Str2, Len(Str2))
        Case CSTR_LESS_THAN
            MsgBox "The string pointed to by the lpString1 parameter is less in lexical value than the string pointed to by the lpString2 parameter."
        Case CSTR_EQUAL
            MsgBox "The string pointed to by lpString1 is equal in lexical value to the string pointed to by lpString2."
        Case CSTR_GREATER_THAN
            MsgBox "The string pointed to by lpString1 is greater in lexical value than the string pointed to by lpString2."
    End Select
End Sub


 
Copyright © 1998-2000, The KPD-Team.
Send mail to KPDTeam@Allapi.net with comments about this web site.
This site is located at
http://www.Allapi.net/