Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String, ByVal cchData As Long) As Long
- Private Sub form_load()
- MsgBox CountryTag
- End Sub
- Public Function CountryTag() As String
- Dim buffer As String * 100
- Dim dl&
- dl& = GetLocaleInfo(0, &H1002, buffer, 99)
- CountryTag = ((LPSTRToVBString(buffer)))
- End Function
- Public Function LPSTRToVBString$(ByVal s$)
- Dim nullpos&
- nullpos& = InStr(s$, Chr$(0))
- If nullpos > 0 Then
- LPSTRToVBString = Left$(s$, nullpos - 1)
- Else
- LPSTRToVBString = ""
- End If
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement