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
a88f66d1
Commit
a88f66d1
authored
Nov 29, 2018
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shcore: Add SHRegDuplicateHKey().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d7a45561
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
1 deletion
+34
-1
main.c
dlls/shcore/main.c
+12
-0
shcore.spec
dlls/shcore/shcore.spec
+1
-1
Makefile.in
dlls/shcore/tests/Makefile.in
+1
-0
shcore.c
dlls/shcore/tests/shcore.c
+20
-0
No files found.
dlls/shcore/main.c
View file @
a88f66d1
...
...
@@ -1751,3 +1751,15 @@ DWORD WINAPI SHAnsiToUnicode(const char *src, WCHAR *dest, int dest_len)
return
ret
;
}
/*************************************************************************
* SHRegDuplicateHKey [SHCORE.@]
*/
HKEY
WINAPI
SHRegDuplicateHKey
(
HKEY
hKey
)
{
HKEY
newKey
=
0
;
RegOpenKeyExW
(
hKey
,
0
,
0
,
MAXIMUM_ALLOWED
,
&
newKey
);
TRACE
(
"new key is %p
\n
"
,
newKey
);
return
newKey
;
}
dlls/shcore/shcore.spec
View file @
a88f66d1
...
...
@@ -61,7 +61,7 @@
@ stdcall SHQueryInfoKeyW(long ptr ptr ptr ptr) shlwapi.SHQueryInfoKeyW
@ stdcall SHQueryValueExA(long str ptr ptr ptr ptr) shlwapi.SHQueryValueExA
@ stdcall SHQueryValueExW(long wstr ptr ptr ptr ptr) shlwapi.SHQueryValueExW
@ stdcall SHRegDuplicateHKey(long)
shlwapi.SHRegDuplicateHKey
@ stdcall SHRegDuplicateHKey(long)
@ stdcall SHRegGetIntW(ptr wstr long) shlwapi.SHRegGetIntW
@ stdcall SHRegGetPathA(long str str ptr long) shlwapi.SHRegGetPathA
@ stdcall SHRegGetPathW(long wstr wstr ptr long) shlwapi.SHRegGetPathW
...
...
dlls/shcore/tests/Makefile.in
View file @
a88f66d1
TESTDLL
=
shcore.dll
IMPORTS
=
advapi32
C_SRCS
=
\
shcore.c
dlls/shcore/tests/shcore.c
View file @
a88f66d1
...
...
@@ -33,6 +33,7 @@ static int (WINAPI *pSHUnicodeToAnsi)(const WCHAR *, char *, int);
static
int
(
WINAPI
*
pSHAnsiToUnicode
)(
const
char
*
,
WCHAR
*
,
int
);
static
int
(
WINAPI
*
pSHAnsiToAnsi
)(
const
char
*
,
char
*
,
int
);
static
int
(
WINAPI
*
pSHUnicodeToUnicode
)(
const
WCHAR
*
,
WCHAR
*
,
int
);
static
HKEY
(
WINAPI
*
pSHRegDuplicateHKey
)(
HKEY
);
static
void
init
(
HMODULE
hshcore
)
{
...
...
@@ -43,6 +44,7 @@ static void init(HMODULE hshcore)
X
(
SHAnsiToUnicode
);
X
(
SHAnsiToAnsi
);
X
(
SHUnicodeToUnicode
);
X
(
SHRegDuplicateHKey
);
#undef X
}
...
...
@@ -300,6 +302,23 @@ static void test_SHUnicodeToUnicode(void)
ok
(
buff
[
5
]
==
'f'
,
"Unexpected buffer contents.
\n
"
);
}
static
void
test_SHRegDuplicateHKey
(
void
)
{
HKEY
hkey
,
hkey2
;
DWORD
ret
;
ret
=
RegCreateKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
Test"
,
&
hkey
);
ok
(
!
ret
,
"Failed to create test key, ret %d.
\n
"
,
ret
);
hkey2
=
pSHRegDuplicateHKey
(
hkey
);
ok
(
hkey2
!=
NULL
&&
hkey2
!=
hkey
,
"Unexpected duplicate key.
\n
"
);
RegCloseKey
(
hkey2
);
RegCloseKey
(
hkey
);
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
Test"
);
}
START_TEST
(
shcore
)
{
HMODULE
hshcore
=
LoadLibraryA
(
"shcore.dll"
);
...
...
@@ -317,4 +336,5 @@ START_TEST(shcore)
test_SHAnsiToUnicode
();
test_SHAnsiToAnsi
();
test_SHUnicodeToUnicode
();
test_SHRegDuplicateHKey
();
}
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