[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 369
  • Last Modified:

Can a MAKELANGID script be created using VB Script?

How would this code be converted into a VB Script?

Public Const LANG_KAZAK                       As Integer = &H3F
Public Const LANG_RUSSIAN                     As Integer = &H19
Public Const LANG_ENGLISH                     As Integer = &H9
Public Const SUBLANG_ENGLISH_US               As Integer = &H1     ' // English (USA)

Public Function MAKELANGID (ByVal usPrimaryLanguage As Integer, ByVal usSubLanguage _
            As Integer) As Long
      MAKELANGID = (usSubLanguage * 1024) Or usPrimaryLanguage
End Function
0
tconingford
Asked:
tconingford
  • 2
1 Solution
 
Scott Fell, EE MVEDeveloperCommented:
I'm only guessing about the function.  

LANG_KAZAK           =63'            As Integer = &H3F 
LANG_RUSSIAN         =25'            As Integer = &H19 
LANG_ENGLISH         =9'            As Integer = &H9 
SUBLANG_ENGLISH_US   =1'            As Integer = &H1     ' // English (USA)

'Submit as x = MAKELANGID(1,"") or x = MAKELANGID("",1)    
Function MAKELANGID (usPrimaryLanguage,usSubLanguage)
      if  usPrimaryLanguage<>"" then
      	MAKELANGID = usPrimaryLanguage
      	else
      	MAKELANGID = (cdbl(usSubLanguage) * 1024)
      end if 
End Function

Open in new window

0
 
Scott Fell, EE MVEDeveloperCommented:
I'm glad it worked out.  thanks for the points!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now