mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[KERNEL32] Import GetLocaleInfoEx from wine-1.9.17
This commit is contained in:
parent
b01b6926a4
commit
f70a1d03b0
1 changed files with 24 additions and 10 deletions
|
@ -1778,17 +1778,31 @@ INT WINAPI GetLocaleInfoW( LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len )
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (WINVER >= 0x0600)
|
#if (WINVER >= 0x0600)
|
||||||
WINBASEAPI
|
/******************************************************************************
|
||||||
int
|
* GetLocaleInfoEx (KERNEL32.@)
|
||||||
WINAPI
|
*/
|
||||||
GetLocaleInfoEx(
|
INT WINAPI GetLocaleInfoEx(LPCWSTR locale, LCTYPE info, LPWSTR buffer, INT len)
|
||||||
_In_opt_ LPCWSTR lpLocaleName,
|
|
||||||
_In_ LCTYPE LCType,
|
|
||||||
_Out_writes_opt_(cchData) LPWSTR lpLCData,
|
|
||||||
_In_ int cchData)
|
|
||||||
{
|
{
|
||||||
TRACE( "GetLocaleInfoEx not implemented (lcid=%s,lctype=0x%x,%s,%d)\n", debugstr_w(lpLocaleName), LCType, debugstr_w(lpLCData), cchData );
|
LCID lcid = LocaleNameToLCID(locale, 0);
|
||||||
return 0;
|
|
||||||
|
TRACE("%s, lcid=0x%x, 0x%x\n", debugstr_w(locale), lcid, info);
|
||||||
|
|
||||||
|
if (!lcid) return 0;
|
||||||
|
|
||||||
|
/* special handling for neutral locale names */
|
||||||
|
if (info == LOCALE_SNAME && strlenW(locale) == 2)
|
||||||
|
{
|
||||||
|
if (len && len < 3)
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_INSUFFICIENT_BUFFER);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (len) strcpyW(buffer, locale);
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
return GetLocaleInfoW(lcid, info, buffer, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
|
|
Loading…
Reference in a new issue