January 1, 2005

WinTask - VerLanguageName

'
' VerLanguageName
'

' Author: Joe Strazzere

'

' retrieves a description string for the language associated with
' a specified binary Microsoft language identifier
'

' "kernel32" Alias "VerLanguageNameA"
'   (ByVal wLang As Long,
'    ByVal szLang As String,
'    ByVal nSize As Long) As Long
'


dim ptr as unsigned


ptr=allocate(255)

 

'0 = Language Neutral
'1033 = US Englisk
'2057 = UK English
'1036 = French
'3081 = Australian English
'1031 = German
'etc

LCID=1033

 

ret = External("kernel32","VerLanguageNameA",LCID, ptr,255)

var$=PeekString$(ptr)

 

msgbox("The language for LCID "+Str$(LCID)+" is: "+var$,,"VerLanguageName")