kernel32: Implement SetUserGeoName().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e610a56734
commit
a430a69f8b
|
@ -1482,6 +1482,7 @@
|
||||||
@ stdcall -arch=x86_64 SetUmsThreadInformation(ptr long ptr long)
|
@ stdcall -arch=x86_64 SetUmsThreadInformation(ptr long ptr long)
|
||||||
@ stdcall -import SetUnhandledExceptionFilter(ptr)
|
@ stdcall -import SetUnhandledExceptionFilter(ptr)
|
||||||
@ stdcall -import SetUserGeoID(long)
|
@ stdcall -import SetUserGeoID(long)
|
||||||
|
@ stdcall -import SetUserGeoName(wstr)
|
||||||
@ stub SetVDMCurrentDirectories
|
@ stub SetVDMCurrentDirectories
|
||||||
@ stdcall SetVolumeLabelA(str str)
|
@ stdcall SetVolumeLabelA(str str)
|
||||||
@ stdcall SetVolumeLabelW(wstr wstr)
|
@ stdcall SetVolumeLabelW(wstr wstr)
|
||||||
|
|
|
@ -1509,6 +1509,7 @@
|
||||||
@ stdcall SetTokenInformation(long long ptr long)
|
@ stdcall SetTokenInformation(long long ptr long)
|
||||||
@ stdcall SetUnhandledExceptionFilter(ptr)
|
@ stdcall SetUnhandledExceptionFilter(ptr)
|
||||||
@ stdcall SetUserGeoID(long)
|
@ stdcall SetUserGeoID(long)
|
||||||
|
@ stdcall SetUserGeoName(wstr)
|
||||||
@ stdcall SetWaitableTimer(long ptr long ptr ptr long)
|
@ stdcall SetWaitableTimer(long ptr long ptr ptr long)
|
||||||
@ stdcall SetWaitableTimerEx(long ptr long ptr ptr ptr long)
|
@ stdcall SetWaitableTimerEx(long ptr long ptr ptr ptr long)
|
||||||
@ stdcall -arch=i386,x86_64 SetXStateFeaturesMask(ptr int64)
|
@ stdcall -arch=i386,x86_64 SetXStateFeaturesMask(ptr int64)
|
||||||
|
|
|
@ -5927,3 +5927,49 @@ INT WINAPI GetUserDefaultGeoName(LPWSTR geo_name, int count)
|
||||||
lstrcpyW( geo_name, buffer );
|
lstrcpyW( geo_name, buffer );
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SetUserDefaultGeoName (kernelbase.@)
|
||||||
|
*/
|
||||||
|
BOOL WINAPI SetUserGeoName(PWSTR geo_name)
|
||||||
|
{
|
||||||
|
unsigned int i;
|
||||||
|
WCHAR *endptr;
|
||||||
|
int uncode;
|
||||||
|
|
||||||
|
TRACE( "geo_name %s.\n", debugstr_w( geo_name ));
|
||||||
|
|
||||||
|
if (!geo_name)
|
||||||
|
{
|
||||||
|
SetLastError( ERROR_INVALID_PARAMETER );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lstrlenW( geo_name ) == 3)
|
||||||
|
{
|
||||||
|
uncode = wcstol( geo_name, &endptr, 10 );
|
||||||
|
if (!uncode || endptr != geo_name + 3)
|
||||||
|
{
|
||||||
|
SetLastError( ERROR_INVALID_PARAMETER );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
for (i = 0; i < ARRAY_SIZE(geoinfodata); ++i)
|
||||||
|
if (geoinfodata[i].uncode == uncode)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!lstrcmpiW( geo_name, L"XX" ))
|
||||||
|
return SetUserGeoID( 39070 );
|
||||||
|
for (i = 0; i < ARRAY_SIZE(geoinfodata); ++i)
|
||||||
|
if (!lstrcmpiW( geo_name, geoinfodata[i].iso2W ))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (i == ARRAY_SIZE(geoinfodata))
|
||||||
|
{
|
||||||
|
SetLastError( ERROR_INVALID_PARAMETER );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
return SetUserGeoID( geoinfodata[i].id );
|
||||||
|
}
|
||||||
|
|
|
@ -983,6 +983,7 @@ WINBASEAPI BOOL WINAPI SetThreadLocale(LCID);
|
||||||
WINBASEAPI BOOL WINAPI SetThreadPreferredUILanguages(DWORD,PCZZWSTR,PULONG);
|
WINBASEAPI BOOL WINAPI SetThreadPreferredUILanguages(DWORD,PCZZWSTR,PULONG);
|
||||||
WINBASEAPI LANGID WINAPI SetThreadUILanguage(LANGID);
|
WINBASEAPI LANGID WINAPI SetThreadUILanguage(LANGID);
|
||||||
WINBASEAPI BOOL WINAPI SetUserGeoID(GEOID);
|
WINBASEAPI BOOL WINAPI SetUserGeoID(GEOID);
|
||||||
|
WINBASEAPI BOOL WINAPI SetUserGeoName(PWSTR);
|
||||||
WINBASEAPI INT WINAPI WideCharToMultiByte(UINT,DWORD,LPCWSTR,INT,LPSTR,INT,LPCSTR,LPBOOL);
|
WINBASEAPI INT WINAPI WideCharToMultiByte(UINT,DWORD,LPCWSTR,INT,LPSTR,INT,LPCSTR,LPBOOL);
|
||||||
WINBASEAPI INT WINAPI FindNLSStringEx(const WCHAR *,DWORD,const WCHAR *,INT,const WCHAR *,INT,INT *,NLSVERSIONINFO *,void *,LPARAM);
|
WINBASEAPI INT WINAPI FindNLSStringEx(const WCHAR *,DWORD,const WCHAR *,INT,const WCHAR *,INT,INT *,NLSVERSIONINFO *,void *,LPARAM);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue