Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

System localization

0 views
Skip to first unread message

Jury Shmarygo

unread,
Jul 9, 1999, 3:00:00 AM7/9/99
to
Hello

Is there a way to find out the localization of the system?
Note: not the System Default Locale, nor the User Default Locale. On CD is
written "Windows NT Server (<laguage>)". I need the <language>.

Thanks,
Jury.

Rob Pitt

unread,
Jul 9, 1999, 3:00:00 AM7/9/99
to
I don't think there is an API for this.

What I do is take a look at the version language info for "user.exe".

Rob

LANGID GetWindowsSystemLangID()
{
LPVOID pData;
LANGID* pLangId;
DWORD dwSize;
char filename[300];

GetSystemDirectory(filename,300);
strcat(filename,"\\user.exe");

pData=NULL;
pLangId=NULL;

dwSize=GetFileVersionInfoSize((char*)(void*)filename,0);
if (dwSize)
{
pData=GlobalAlloc(GPTR,dwSize);
GetFileVersionInfo((char*)(void*)filename,0,dwSize,pData);
}

if (pData)
{

VerQueryValue(pData,"\\VarFileInfo\\Translation",(LPVOID*)&pLangId,(PUINT)&d
wSize);
GlobalFree(pData);
}

if (pLangId)
return *pLangId;

return 0;
}


0 new messages