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
3bba4065
Commit
3bba4065
authored
May 04, 2023
by
Shaun Ren
Committed by
Alexandre Julliard
May 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sapi: Implement ISpRegDataKey::OpenKey.
parent
51e84c02
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
2 deletions
+38
-2
token.c
dlls/sapi/tests/token.c
+7
-0
token.c
dlls/sapi/token.c
+31
-2
No files found.
dlls/sapi/tests/token.c
View file @
3bba4065
...
...
@@ -71,10 +71,17 @@ static void test_data_key(void)
ok
(
!
wcscmp
(
value
,
L"Test"
),
"got %s
\n
"
,
wine_dbgstr_w
(
value
)
);
CoTaskMemFree
(
value
);
hr
=
ISpRegDataKey_OpenKey
(
data_key
,
L"Testing"
,
&
sub
);
ok
(
hr
==
SPERR_NOT_FOUND
,
"got %08lx
\n
"
,
hr
);
hr
=
ISpRegDataKey_CreateKey
(
data_key
,
L"Testing"
,
&
sub
);
ok
(
hr
==
S_OK
,
"got %08lx
\n
"
,
hr
);
ISpDataKey_Release
(
sub
);
hr
=
ISpRegDataKey_OpenKey
(
data_key
,
L"Testing"
,
&
sub
);
ok
(
hr
==
S_OK
,
"got %08lx
\n
"
,
hr
);
ISpDataKey_Release
(
sub
);
ISpRegDataKey_Release
(
data_key
);
hr
=
CoCreateInstance
(
&
CLSID_SpDataKey
,
NULL
,
CLSCTX_INPROC_SERVER
,
...
...
dlls/sapi/token.c
View file @
3bba4065
...
...
@@ -186,8 +186,37 @@ static HRESULT WINAPI data_key_GetDWORD( ISpRegDataKey *iface,
static
HRESULT
WINAPI
data_key_OpenKey
(
ISpRegDataKey
*
iface
,
LPCWSTR
name
,
ISpDataKey
**
sub_key
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
struct
data_key
*
This
=
impl_from_ISpRegDataKey
(
iface
);
ISpRegDataKey
*
spregkey
;
HRESULT
hr
;
HKEY
key
;
LONG
ret
;
TRACE
(
"%p, %s, %p
\n
"
,
This
,
debugstr_w
(
name
),
sub_key
);
ret
=
RegOpenKeyExW
(
This
->
key
,
name
,
0
,
KEY_ALL_ACCESS
,
&
key
);
if
(
ret
!=
ERROR_SUCCESS
)
return
SPERR_NOT_FOUND
;
hr
=
data_key_create
(
NULL
,
&
IID_ISpRegDataKey
,
(
void
**
)
&
spregkey
);
if
(
FAILED
(
hr
))
{
RegCloseKey
(
key
);
return
hr
;
}
hr
=
ISpRegDataKey_SetKey
(
spregkey
,
key
,
FALSE
);
if
(
FAILED
(
hr
))
{
RegCloseKey
(
key
);
ISpRegDataKey_Release
(
spregkey
);
return
hr
;
}
hr
=
ISpRegDataKey_QueryInterface
(
spregkey
,
&
IID_ISpDataKey
,
(
void
**
)
sub_key
);
ISpRegDataKey_Release
(
spregkey
);
return
hr
;
}
static
HRESULT
WINAPI
data_key_CreateKey
(
ISpRegDataKey
*
iface
,
...
...
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