in reply to Re^2: How to call GetSystemDefaultLangID() with Win32::API
in thread How to call GetSystemDefaultLangID() with Win32::API
The following code DOES produce the expected "1033" value for English:
use strict; use warnings; use Win32::API; Win32::API->Import('kernel32.dll', 'long GetSystemDefaultLangID()') or die "Can't import GetSystemDefaultLangID: $^E\n"; my $langid = GetSystemDefaultLangID() & 0xFFFF # Mask out the garbage + in high-order bytes or die "ERROR: LANGID Returned <undef>\n"; print "Returned '$langid'\n"; printf "Lang ID: 0x%04X\n", $langid; # Print output---- # Returned '1033' # Lang ID: 0x0409
Earth first! (We'll rob the other planets later)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: How to call GetSystemDefaultLangID() with Win32::API
by shay (Beadle) on Jun 24, 2004 at 12:34 UTC |