EnumSystemLocalesA should look for registry values, not subkeys.
This commit is contained in:
parent
5b66f70f67
commit
ae26a07459
|
@ -869,12 +869,17 @@ 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)) {
|
|
||||||
|
if ( ERROR_SUCCESS==RegOpenKeyA(HKEY_LOCAL_MACHINE,
|
||||||
|
"System\\CurrentControlSet\\Control\\Nls\\Locale\\",
|
||||||
|
&xhkey)) {
|
||||||
i=0;
|
i=0;
|
||||||
while (1) {
|
while (1) {
|
||||||
if (ERROR_SUCCESS!=RegEnumKeyA(xhkey,i,buffer,sizeof(buffer)))
|
DWORD size=sizeof(buffer);
|
||||||
|
if (ERROR_SUCCESS!=RegEnumValueA(xhkey,i,buffer,&size,NULL,
|
||||||
|
NULL, NULL,NULL))
|
||||||
break;
|
break;
|
||||||
if (!lpfnLocaleEnum(buffer))
|
if (size && !lpfnLocaleEnum(buffer))
|
||||||
break;
|
break;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue