Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
d5385c71
Commit
d5385c71
authored
Nov 21, 2022
by
Santino Mazza
Committed by
Alexandre Julliard
Nov 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Implement GetGeoInfoEx.
parent
52ffd338
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
8 deletions
+21
-8
locale.c
dlls/kernel32/tests/locale.c
+6
-6
locale.c
dlls/kernelbase/locale.c
+15
-2
No files found.
dlls/kernel32/tests/locale.c
View file @
d5385c71
...
...
@@ -5977,26 +5977,26 @@ static void test_GetGeoInfo(void)
/* Test with ISO 3166-1 */
ret
=
pGetGeoInfoEx
(
L"AR"
,
GEO_ISO3
,
buffW
,
ARRAYSIZE
(
buffW
));
todo_wine
ok
(
ret
!=
0
,
"GetGeoInfoEx failed %ld.
\n
"
,
GetLastError
());
todo_wine
ok
(
!
wcscmp
(
buffW
,
L"ARG"
),
"expected string to be ARG, got %ls
\n
"
,
buffW
);
ok
(
ret
!=
0
,
"GetGeoInfoEx failed %ld.
\n
"
,
GetLastError
());
ok
(
!
wcscmp
(
buffW
,
L"ARG"
),
"expected string to be ARG, got %ls
\n
"
,
buffW
);
/* Test with UN M.49 */
SetLastError
(
0xdeadbeef
);
ret
=
pGetGeoInfoEx
(
L"032"
,
GEO_ISO3
,
buffW
,
ARRAYSIZE
(
buffW
));
ok
(
ret
==
0
,
"expected GetGeoInfoEx to fail.
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER got %ld.
\n
"
,
GetLastError
());
/* Test GEO_ID */
ret
=
pGetGeoInfoEx
(
L"AR"
,
GEO_ID
,
buffW
,
ARRAYSIZE
(
buffW
));
todo_wine
ok
(
ret
!=
0
,
"GetGeoInfoEx failed %ld.
\n
"
,
GetLastError
());
todo_wine
ok
(
!
wcscmp
(
buffW
,
L"11"
),
"expected string to be 11, got %ls
\n
"
,
buffW
);
ok
(
ret
!=
0
,
"GetGeoInfoEx failed %ld.
\n
"
,
GetLastError
());
ok
(
!
wcscmp
(
buffW
,
L"11"
),
"expected string to be 11, got %ls
\n
"
,
buffW
);
/* Test with invalid geo type */
SetLastError
(
0xdeadbeef
);
ret
=
pGetGeoInfoEx
(
L"AR"
,
GEO_LCID
,
buffW
,
ARRAYSIZE
(
buffW
));
ok
(
ret
==
0
,
"expected GetGeoInfoEx to fail.
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_FLAGS
,
ok
(
GetLastError
()
==
ERROR_INVALID_FLAGS
,
"expected ERROR_INVALID_PARAMETER got %ld.
\n
"
,
GetLastError
());
}
...
...
dlls/kernelbase/locale.c
View file @
d5385c71
...
...
@@ -5746,10 +5746,23 @@ INT WINAPI DECLSPEC_HOTPATCH GetGeoInfoW( GEOID id, GEOTYPE type, WCHAR *data, i
INT
WINAPI
DECLSPEC_HOTPATCH
GetGeoInfoEx
(
WCHAR
*
location
,
GEOTYPE
type
,
WCHAR
*
data
,
int
data_count
)
{
FIXME
(
"stub: %s %lx %p %d
\n
"
,
wine_dbgstr_w
(
location
),
type
,
data
,
data_count
);
const
struct
geo_id
*
ptr
=
find_geo_name_entry
(
location
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
TRACE
(
"%s %lx %p %d
\n
"
,
wine_dbgstr_w
(
location
),
type
,
data
,
data_count
);
if
(
!
ptr
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
if
(
type
==
GEO_LCID
||
type
==
GEO_NATION
||
type
==
GEO_RFC1766
)
{
SetLastError
(
ERROR_INVALID_FLAGS
);
return
0
;
}
return
get_geo_info
(
ptr
,
type
,
data
,
data_count
,
0
);
}
...
...
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