Author: dchapyshev
Date: Sun Jan 18 07:13:31 2009
New Revision: 38890
URL:
http://svn.reactos.org/svn/reactos?rev=38890&view=rev
Log:
- Partly sync with Wine head
Modified:
trunk/reactos/dll/win32/kernel32/misc/lang.c
Modified: trunk/reactos/dll/win32/kernel32/misc/lang.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/la…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/lang.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/lang.c [iso-8859-1] Sun Jan 18 07:13:31 2009
@@ -1622,6 +1622,11 @@
case LOCALE_ITLZERO: return L"iTLZero";
case LOCALE_SCOUNTRY: return L"sCountry";
case LOCALE_SLANGUAGE: return L"sLanguage";
+
+ /* The following are used in XP and later */
+ case LOCALE_IDIGITSUBSTITUTION: return L"NumShape";
+ case LOCALE_SNATIVEDIGITS: return L"sNativeDigits";
+ case LOCALE_ITIMEMARKPOSN: return L"iTimePrefix";
}
return NULL;
}
@@ -1670,7 +1675,6 @@
}
ntStatus = NtQueryValueKey( hKey, &usNameW, KeyValuePartialInformation, kvpiInfo,
dwSize, &dwSize );
- if (ntStatus == STATUS_BUFFER_OVERFLOW && !lpBuffer) ntStatus = 0;
if (!ntStatus)
{
@@ -1691,14 +1695,18 @@
lpBuffer[nRet - 1] = 0;
}
}
+ else if (ntStatus == STATUS_BUFFER_OVERFLOW && !lpBuffer)
+ {
+ nRet = (dwSize - nInfoSize) / sizeof(WCHAR) + 1;
+ }
+ else if (ntStatus == STATUS_OBJECT_NAME_NOT_FOUND)
+ {
+ nRet = -1;
+ }
else
{
- if (ntStatus == STATUS_OBJECT_NAME_NOT_FOUND) nRet = -1;
- else
- {
- SetLastError( RtlNtStatusToDosError(ntStatus) );
- nRet = 0;
- }
+ SetLastError( RtlNtStatusToDosError(ntStatus) );
+ nRet = 0;
}
NtClose( hKey );
HeapFree( GetProcessHeap(), 0, kvpiInfo );