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
9ea45b5a
Commit
9ea45b5a
authored
Sep 22, 2021
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Oct 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sapi: Implement ISpObjectToken OpenKey.
parent
e58052d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
2 deletions
+39
-2
token.c
dlls/sapi/tests/token.c
+8
-0
token.c
dlls/sapi/token.c
+31
-2
No files found.
dlls/sapi/tests/token.c
View file @
9ea45b5a
...
...
@@ -194,6 +194,7 @@ static void test_default_token_id(void)
static
void
test_object_token
(
void
)
{
ISpObjectToken
*
token
;
ISpDataKey
*
sub_key
;
HRESULT
hr
;
LPWSTR
tempW
,
token_id
;
ISpObjectTokenCategory
*
cat
;
...
...
@@ -253,6 +254,13 @@ static void test_object_token(void)
CoTaskMemFree
(
tempW
);
}
hr
=
ISpObjectToken_OpenKey
(
token
,
L"Non-exist"
,
&
sub_key
);
ok
(
hr
==
SPERR_NOT_FOUND
,
"got %08lx
\n
"
,
hr
);
hr
=
ISpObjectToken_OpenKey
(
token
,
L"Classes"
,
&
sub_key
);
ok
(
hr
==
S_OK
,
"got %08lx
\n
"
,
hr
);
ISpDataKey_Release
(
sub_key
);
cat
=
(
LPVOID
)
0xdeadbeef
;
hr
=
ISpObjectToken_GetCategory
(
token
,
&
cat
);
todo_wine
ok
(
hr
==
SPERR_INVALID_REGISTRY_KEY
,
"got %08lx
\n
"
,
hr
);
...
...
dlls/sapi/token.c
View file @
9ea45b5a
...
...
@@ -931,8 +931,37 @@ static HRESULT WINAPI token_GetDWORD( ISpObjectToken *iface,
static
HRESULT
WINAPI
token_OpenKey
(
ISpObjectToken
*
iface
,
LPCWSTR
name
,
ISpDataKey
**
sub_key
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
struct
object_token
*
This
=
impl_from_ISpObjectToken
(
iface
);
ISpRegDataKey
*
spregkey
;
HRESULT
hr
;
HKEY
key
;
LONG
ret
;
TRACE
(
"%p, %s, %p
\n
"
,
This
,
debugstr_w
(
name
),
sub_key
);
ret
=
RegOpenKeyExW
(
This
->
token_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
token_CreateKey
(
ISpObjectToken
*
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