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
490f8aaa
Commit
490f8aaa
authored
Sep 28, 2021
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Oct 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sapi: Implement ISpObjectTokenEnumBuilder Next.
parent
ca3ffa65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
3 deletions
+44
-3
token.c
dlls/sapi/token.c
+44
-3
No files found.
dlls/sapi/token.c
View file @
490f8aaa
...
...
@@ -519,6 +519,7 @@ struct token_enum
WCHAR
*
req
,
*
opt
;
ULONG
count
;
HKEY
key
;
DWORD
index
;
};
static
struct
token_enum
*
impl_from_ISpObjectTokenEnumBuilder
(
ISpObjectTokenEnumBuilder
*
iface
)
...
...
@@ -704,15 +705,54 @@ static HRESULT WINAPI token_enum_Next( ISpObjectTokenEnumBuilder *iface,
ULONG
*
fetched
)
{
struct
token_enum
*
This
=
impl_from_ISpObjectTokenEnumBuilder
(
iface
);
struct
object_token
*
object
;
HRESULT
hr
;
DWORD
retCode
;
WCHAR
*
subkey_name
;
HKEY
sub_key
;
DWORD
size
;
TRACE
(
"(%p)->(%lu %p %p)
\n
"
,
This
,
num
,
tokens
,
fetched
);
if
(
!
This
->
init
)
return
SPERR_UNINITIALIZED
;
if
(
fetched
)
*
fetched
=
0
;
FIXME
(
"semi-stub: Returning an empty enumerator
\n
"
)
;
*
tokens
=
NULL
;
if
(
fetched
)
*
fetched
=
0
;
return
S_FALSE
;
RegQueryInfoKeyW
(
This
->
key
,
NULL
,
NULL
,
NULL
,
NULL
,
&
size
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
size
=
(
size
+
1
)
*
sizeof
(
WCHAR
);
subkey_name
=
heap_alloc
(
size
);
if
(
!
subkey_name
)
return
E_OUTOFMEMORY
;
retCode
=
RegEnumKeyExW
(
This
->
key
,
This
->
index
,
subkey_name
,
&
size
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
retCode
!=
ERROR_SUCCESS
)
{
heap_free
(
subkey_name
);
return
S_FALSE
;
}
This
->
index
++
;
if
(
RegOpenKeyExW
(
This
->
key
,
subkey_name
,
0
,
KEY_READ
,
&
sub_key
)
!=
ERROR_SUCCESS
)
{
heap_free
(
subkey_name
);
return
E_FAIL
;
}
hr
=
token_create
(
NULL
,
&
IID_ISpObjectToken
,
(
void
**
)
tokens
);
if
(
FAILED
(
hr
))
{
heap_free
(
subkey_name
);
return
hr
;
}
object
=
impl_from_ISpObjectToken
(
*
tokens
);
object
->
token_key
=
sub_key
;
object
->
token_id
=
subkey_name
;
if
(
fetched
)
*
fetched
=
1
;
return
hr
;
}
static
HRESULT
WINAPI
token_enum_Skip
(
ISpObjectTokenEnumBuilder
*
iface
,
...
...
@@ -887,6 +927,7 @@ HRESULT token_enum_create( IUnknown *outer, REFIID iid, void **obj )
This
->
init
=
FALSE
;
This
->
count
=
0
;
This
->
key
=
NULL
;
This
->
index
=
0
;
hr
=
ISpObjectTokenEnumBuilder_QueryInterface
(
&
This
->
ISpObjectTokenEnumBuilder_iface
,
iid
,
obj
);
...
...
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