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
f2e0a145
Commit
f2e0a145
authored
Nov 22, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Use RegLoadMUIStringW() from kernelbase.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7786d376
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
22 deletions
+5
-22
time.c
dlls/kernel32/time.c
+5
-22
No files found.
dlls/kernel32/time.c
View file @
f2e0a145
...
...
@@ -47,6 +47,7 @@
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winternl.h"
#include "kernel_private.h"
#include "wine/unicode.h"
...
...
@@ -381,24 +382,6 @@ static BOOL reg_query_value(HKEY hkey, LPCWSTR name, DWORD type, void *data, DWO
return
TRUE
;
}
static
BOOL
reg_load_mui_string
(
HKEY
hkey
,
LPCWSTR
value
,
LPWSTR
buffer
,
DWORD
size
)
{
static
const
WCHAR
advapi32W
[]
=
{
'a'
,
'd'
,
'v'
,
'a'
,
'p'
,
'i'
,
'3'
,
'2'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
DWORD
(
WINAPI
*
pRegLoadMUIStringW
)(
HKEY
,
LPCWSTR
,
LPWSTR
,
DWORD
,
DWORD
*
,
DWORD
,
LPCWSTR
);
HMODULE
hDll
;
BOOL
ret
=
FALSE
;
hDll
=
LoadLibraryExW
(
advapi32W
,
NULL
,
LOAD_LIBRARY_SEARCH_SYSTEM32
);
if
(
hDll
)
{
pRegLoadMUIStringW
=
(
void
*
)
GetProcAddress
(
hDll
,
"RegLoadMUIStringW"
);
if
(
pRegLoadMUIStringW
&&
!
pRegLoadMUIStringW
(
hkey
,
value
,
buffer
,
size
,
NULL
,
0
,
DIR_System
))
ret
=
TRUE
;
FreeLibrary
(
hDll
);
}
return
ret
;
}
/***********************************************************************
* TIME_GetSpecificTimeZoneInfo
*
...
...
@@ -438,14 +421,14 @@ static BOOL TIME_GetSpecificTimeZoneInfo( const WCHAR *key_name, WORD year,
if
(
!
TIME_GetSpecificTimeZoneKey
(
key_name
,
&
time_zone_key
))
return
FALSE
;
if
(
!
reg_load_mui_string
(
time_zone_key
,
mui_stdW
,
tzinfo
->
StandardName
,
sizeof
(
tzinfo
->
StandardName
)
)
&&
if
(
RegLoadMUIStringW
(
time_zone_key
,
mui_stdW
,
tzinfo
->
StandardName
,
sizeof
(
tzinfo
->
StandardName
),
NULL
,
0
,
DIR_System
)
&&
!
reg_query_value
(
time_zone_key
,
stdW
,
REG_SZ
,
tzinfo
->
StandardName
,
sizeof
(
tzinfo
->
StandardName
)
))
{
NtClose
(
time_zone_key
);
return
FALSE
;
}
if
(
!
reg_load_mui_string
(
time_zone_key
,
mui_dltW
,
tzinfo
->
DaylightName
,
sizeof
(
tzinfo
->
DaylightName
)
)
&&
if
(
RegLoadMUIStringW
(
time_zone_key
,
mui_dltW
,
tzinfo
->
DaylightName
,
sizeof
(
tzinfo
->
DaylightName
),
NULL
,
0
,
DIR_System
)
&&
!
reg_query_value
(
time_zone_key
,
dltW
,
REG_SZ
,
tzinfo
->
DaylightName
,
sizeof
(
tzinfo
->
DaylightName
)
))
{
NtClose
(
time_zone_key
);
...
...
@@ -1005,8 +988,8 @@ DWORD WINAPI GetDynamicTimeZoneInformation(DYNAMIC_TIME_ZONE_INFORMATION *tzinfo
if
(
!
TIME_GetSpecificTimeZoneKey
(
tzinfo
->
TimeZoneKeyName
,
&
time_zone_key
))
return
TIME_ZONE_ID_INVALID
;
reg_load_mui_string
(
time_zone_key
,
mui_stdW
,
tzinfo
->
StandardName
,
sizeof
(
tzinfo
->
StandardName
)
);
reg_load_mui_string
(
time_zone_key
,
mui_dltW
,
tzinfo
->
DaylightName
,
sizeof
(
tzinfo
->
DaylightName
)
);
RegLoadMUIStringW
(
time_zone_key
,
mui_stdW
,
tzinfo
->
StandardName
,
sizeof
(
tzinfo
->
StandardName
),
NULL
,
0
,
DIR_System
);
RegLoadMUIStringW
(
time_zone_key
,
mui_dltW
,
tzinfo
->
DaylightName
,
sizeof
(
tzinfo
->
DaylightName
),
NULL
,
0
,
DIR_System
);
NtClose
(
time_zone_key
);
return
TIME_ZoneID
(
(
TIME_ZONE_INFORMATION
*
)
tzinfo
);
...
...
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