in reply to Re^2: How to call GetSystemDefaultLangID() with Win32::API
in thread How to call GetSystemDefaultLangID() with Win32::API

How do I get the /right/ answer out of it, not just any old rubbish?

You work out for yourself how to make the 9 character addition to the snippet I posted required to get the answer you need.

use strict; use warnings; use Win32::API::Prototype; ApiLink( 'kernel32.dll', 'LONG GetSystemDefaultLangID( VOID )' ) or die "Can't import GetSystemDefaultLangID: $^E\n"; my $langid = GetSystemDefaultLangID( 0 ) & 0xffff; if (defined $langid) { print "Returned '$langid'\n"; printf "Lang ID: 0x%04X\n", $langid; } else { print "Returned <undef>\n"; } __END__ P:\test>369060 Returned '1033' Lang ID: 0x0409

Of course, I could have searched through the header files, looked up what a LANGID was, and added these characters to my post, but I didn't have any real interest in doing that. You need the solution, not me.

Perhaps I could clean your keyboard for you?


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon