Sign in to follow this  
Followers 0
Jonniy

Function not working on other windows version

3 posts in this topic

#1 ·  Posted (edited)

So this is the function:

Func Country($Lang = "")
    Local Const $GetLanguage = 114
    Local $a = DllCall('kernel32.dll', 'int', 'GetLocaleInfoW', 'ulong', Dec($Lang), 'dword', $GetLanguage, 'wstr', '', 'int', 2048)
Return $a[3]
EndFunc

And it works on win7/8, but not on xp/vista. Actually I have no idea how this works, and a dude of mine has this problem. He wants to get this via a .dll, and not another method. I ask instead of him because he asked me, and I'm at a loss.
 

Edited by Jonniy

Thanks for your help & have a good day. Yours sincerely, -Jonniy-  

Share this post


Link to post
Share on other sites



Far more likely to be a difference in architecture than OS. MSDN says minimum supported OS is server 2000, so XP should be fine.

Have you tried using _WinAPI_GetLocaleInfo?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

He is currently trying that.

EDIT: @Mat Seems to be working.
Solution for others:
MsgBox(0, "Test", _WinAPI_GetLocaleInfo( _WinAPI_GetUserDefaultLCID(), 0x1002) )

Edited by Jonniy

Thanks for your help & have a good day. Yours sincerely, -Jonniy-  

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0