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.
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;
}