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
ca3ffa65
Commit
ca3ffa65
authored
Sep 22, 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 Item.
parent
ff1c9633
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
16 deletions
+59
-16
token.c
dlls/sapi/token.c
+59
-16
No files found.
dlls/sapi/token.c
View file @
ca3ffa65
...
...
@@ -48,6 +48,20 @@ static struct data_key *impl_from_ISpRegDataKey( ISpRegDataKey *iface )
return
CONTAINING_RECORD
(
iface
,
struct
data_key
,
ISpRegDataKey_iface
);
}
struct
object_token
{
ISpObjectToken
ISpObjectToken_iface
;
LONG
ref
;
HKEY
token_key
;
WCHAR
*
token_id
;
};
static
struct
object_token
*
impl_from_ISpObjectToken
(
ISpObjectToken
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
object_token
,
ISpObjectToken_iface
);
}
static
HRESULT
WINAPI
data_key_QueryInterface
(
ISpRegDataKey
*
iface
,
REFIID
iid
,
void
**
obj
)
{
struct
data_key
*
This
=
impl_from_ISpRegDataKey
(
iface
);
...
...
@@ -724,8 +738,51 @@ static HRESULT WINAPI token_enum_Clone( ISpObjectTokenEnumBuilder *iface,
static
HRESULT
WINAPI
token_enum_Item
(
ISpObjectTokenEnumBuilder
*
iface
,
ULONG
index
,
ISpObjectToken
**
token
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
struct
token_enum
*
This
=
impl_from_ISpObjectTokenEnumBuilder
(
iface
);
struct
object_token
*
object
;
ISpObjectToken
*
subtoken
;
HRESULT
hr
;
WCHAR
*
subkey
;
DWORD
size
;
LONG
ret
;
HKEY
key
;
TRACE
(
"%p, %lu, %p
\n
"
,
This
,
index
,
token
);
if
(
!
This
->
init
)
return
SPERR_UNINITIALIZED
;
RegQueryInfoKeyW
(
This
->
key
,
NULL
,
NULL
,
NULL
,
NULL
,
&
size
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
size
=
(
size
+
1
)
*
sizeof
(
WCHAR
);
subkey
=
heap_alloc
(
size
);
if
(
!
subkey
)
return
E_OUTOFMEMORY
;
ret
=
RegEnumKeyExW
(
This
->
key
,
index
,
subkey
,
&
size
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
ret
!=
ERROR_SUCCESS
)
{
heap_free
(
subkey
);
return
HRESULT_FROM_WIN32
(
ret
);
}
ret
=
RegOpenKeyExW
(
This
->
key
,
subkey
,
0
,
KEY_READ
,
&
key
);
if
(
ret
!=
ERROR_SUCCESS
)
{
heap_free
(
subkey
);
return
HRESULT_FROM_WIN32
(
ret
);
}
hr
=
token_create
(
NULL
,
&
IID_ISpObjectToken
,
(
void
**
)
&
subtoken
);
if
(
FAILED
(
hr
))
return
hr
;
object
=
impl_from_ISpObjectToken
(
subtoken
);
object
->
token_key
=
key
;
object
->
token_id
=
subkey
;
*
token
=
subtoken
;
return
hr
;
}
static
HRESULT
WINAPI
token_enum_GetCount
(
ISpObjectTokenEnumBuilder
*
iface
,
...
...
@@ -837,20 +894,6 @@ HRESULT token_enum_create( IUnknown *outer, REFIID iid, void **obj )
return
hr
;
}
struct
object_token
{
ISpObjectToken
ISpObjectToken_iface
;
LONG
ref
;
HKEY
token_key
;
WCHAR
*
token_id
;
};
static
struct
object_token
*
impl_from_ISpObjectToken
(
ISpObjectToken
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
object_token
,
ISpObjectToken_iface
);
}
static
HRESULT
WINAPI
token_QueryInterface
(
ISpObjectToken
*
iface
,
REFIID
iid
,
void
**
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