|
|
#1 |
|
Junior Member
Join Date: Jul 2006
Posts: 43
|
I want to use this in my script.
code: If I know the language, I can set some Variables with the right value. But my Output of R7 is in my case : 1508361 I tried google but noway this is a LangID. How can I covert the value to a Valid LangID Glim |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
If you cast 1508361 to a LANGID (short), you get 1033, which is actually ${LANG_ENGLISH}. GetSystemDefaultLangID returns a short, not a 4 bytes integer. I don't understand why it'd return that extra byte of 17. When called from a C program, it returns the correct value, but the C program only takes 2 bytes off eax. I'll have to look into it...
For now, you can "cast" $R7 yourself, using: code: NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
Fixed for 2.19.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Jul 2006
Posts: 43
|
Thanks Kichik
|
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Dec 2004
Location: Turkey
Posts: 447
|
Good fix, Thanks!
"Just do it" |
|
|
|
|
|
#6 |
|
Member
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 63
|
I've had problems (until I found this thread) with GetSystemDefaultLangID on Vista. On XP it returns 1050 (Croatian, default on my system), but in Vista it returns a 7-digit code (just like in Glimmerman's case), which is different every time. Kichik's 'casting trick' fixes this and turns those values into 1050. Thanks Kichik!
GetUserDefaultLangID, on the other hand, works perfectly fine, it returns a valid LangID in both XP and Vista. Problems aside, I'm wondering which function is generally preferred and 'safer' to use? |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|