EnumSystemLocalesA should look for registry values, not subkeys.

This commit is contained in:
Rein Klazes 1999-12-20 04:05:58 +00:00 committed by Alexandre Julliard
parent 5b66f70f67
commit ae26a07459
1 changed files with 16 additions and 11 deletions

View File

@ -869,17 +869,22 @@ BOOL WINAPI EnumSystemLocalesA(LOCALE_ENUMPROCA lpfnLocaleEnum,
TRACE_(win32)("(%p,%08lx)\n", TRACE_(win32)("(%p,%08lx)\n",
lpfnLocaleEnum,flags lpfnLocaleEnum,flags
); );
if (ERROR_SUCCESS==RegOpenKeyA(HKEY_LOCAL_MACHINE,"System\\CurrentControlSet\\control\\Nls\\Locale\\",&xhkey)) {
i=0; if ( ERROR_SUCCESS==RegOpenKeyA(HKEY_LOCAL_MACHINE,
while (1) { "System\\CurrentControlSet\\Control\\Nls\\Locale\\",
if (ERROR_SUCCESS!=RegEnumKeyA(xhkey,i,buffer,sizeof(buffer))) &xhkey)) {
break; i=0;
if (!lpfnLocaleEnum(buffer)) while (1) {
break; DWORD size=sizeof(buffer);
i++; if (ERROR_SUCCESS!=RegEnumValueA(xhkey,i,buffer,&size,NULL,
} NULL, NULL,NULL))
RegCloseKey(xhkey); break;
return TRUE; if (size && !lpfnLocaleEnum(buffer))
break;
i++;
}
RegCloseKey(xhkey);
return TRUE;
} }
i=0; i=0;
while (languages[i].langid!=0) { while (languages[i].langid!=0) {