Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a430a69f
Commit
a430a69f
authored
Mar 08, 2021
by
Paul Gofman
Committed by
Alexandre Julliard
Mar 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Implement SetUserGeoName().
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e610a567
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
0 deletions
+49
-0
kernel32.spec
dlls/kernel32/kernel32.spec
+1
-0
kernelbase.spec
dlls/kernelbase/kernelbase.spec
+1
-0
locale.c
dlls/kernelbase/locale.c
+46
-0
winnls.h
include/winnls.h
+1
-0
No files found.
dlls/kernel32/kernel32.spec
View file @
a430a69f
...
...
@@ -1482,6 +1482,7 @@
@ stdcall -arch=x86_64 SetUmsThreadInformation(ptr long ptr long)
@ stdcall -import SetUnhandledExceptionFilter(ptr)
@ stdcall -import SetUserGeoID(long)
@ stdcall -import SetUserGeoName(wstr)
@ stub SetVDMCurrentDirectories
@ stdcall SetVolumeLabelA(str str)
@ stdcall SetVolumeLabelW(wstr wstr)
...
...
dlls/kernelbase/kernelbase.spec
View file @
a430a69f
...
...
@@ -1509,6 +1509,7 @@
@ stdcall SetTokenInformation(long long ptr long)
@ stdcall SetUnhandledExceptionFilter(ptr)
@ stdcall SetUserGeoID(long)
@ stdcall SetUserGeoName(wstr)
@ stdcall SetWaitableTimer(long ptr long ptr ptr long)
@ stdcall SetWaitableTimerEx(long ptr long ptr ptr ptr long)
@ stdcall -arch=i386,x86_64 SetXStateFeaturesMask(ptr int64)
...
...
dlls/kernelbase/locale.c
View file @
a430a69f
...
...
@@ -5927,3 +5927,49 @@ INT WINAPI GetUserDefaultGeoName(LPWSTR geo_name, int count)
lstrcpyW
(
geo_name
,
buffer
);
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
);
}
include/winnls.h
View file @
a430a69f
...
...
@@ -983,6 +983,7 @@ WINBASEAPI BOOL WINAPI SetThreadLocale(LCID);
WINBASEAPI
BOOL
WINAPI
SetThreadPreferredUILanguages
(
DWORD
,
PCZZWSTR
,
PULONG
);
WINBASEAPI
LANGID
WINAPI
SetThreadUILanguage
(
LANGID
);
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
FindNLSStringEx
(
const
WCHAR
*
,
DWORD
,
const
WCHAR
*
,
INT
,
const
WCHAR
*
,
INT
,
INT
*
,
NLSVERSIONINFO
*
,
void
*
,
LPARAM
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment