Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
87c2fc04
Commit
87c2fc04
authored
Sep 22, 2021
by
Alistair Leslie-Hughes
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sapi: Implement ISpObjectToken GetId
parent
9b2adcda
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
6 deletions
+28
-6
token.c
dlls/sapi/tests/token.c
+4
-3
token.c
dlls/sapi/token.c
+24
-3
No files found.
dlls/sapi/tests/token.c
View file @
87c2fc04
...
...
@@ -185,11 +185,11 @@ static void test_object_token(void)
ok
(
hr
==
S_OK
,
"got %08lx
\n
"
,
hr
);
hr
=
ISpObjectToken_GetId
(
token
,
NULL
);
todo_wine
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08lx
\n
"
,
hr
);
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08lx
\n
"
,
hr
);
tempW
=
(
LPWSTR
)
0xdeadbeef
;
hr
=
ISpObjectToken_GetId
(
token
,
&
tempW
);
todo_wine
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08lx
\n
"
,
hr
);
ok
(
hr
==
SPERR_UNINITIALIZED
,
"got %08lx
\n
"
,
hr
);
ok
(
tempW
==
(
LPWSTR
)
0xdeadbeef
,
"got %s
\n
"
,
wine_dbgstr_w
(
tempW
)
);
hr
=
ISpObjectToken_GetCategory
(
token
,
NULL
);
...
...
@@ -220,7 +220,7 @@ static void test_object_token(void)
ok
(
hr
==
SPERR_ALREADY_INITIALIZED
,
"got %08lx
\n
"
,
hr
);
hr
=
ISpObjectToken_GetId
(
token
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"got %08lx
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"got %08lx
\n
"
,
hr
);
hr
=
ISpObjectToken_GetCategory
(
token
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"got %08lx
\n
"
,
hr
);
...
...
@@ -297,6 +297,7 @@ static void test_object_token(void)
ISpObjectToken_Release
(
token
);
}
START_TEST
(
token
)
{
CoInitialize
(
NULL
);
...
...
dlls/sapi/token.c
View file @
87c2fc04
...
...
@@ -70,6 +70,7 @@ struct object_token
LONG
ref
;
HKEY
token_key
;
WCHAR
*
token_id
;
};
static
struct
object_token
*
impl_from_ISpObjectToken
(
ISpObjectToken
*
iface
)
...
...
@@ -765,7 +766,6 @@ static HRESULT WINAPI token_enum_Item( ISpObjectTokenEnumBuilder *iface,
ret
=
RegOpenKeyExW
(
This
->
key
,
subkey
,
0
,
KEY_READ
,
&
key
);
if
(
ret
!=
ERROR_SUCCESS
)
return
HRESULT_FROM_WIN32
(
ret
);
heap_free
(
subkey
);
hr
=
token_create
(
NULL
,
&
IID_ISpObjectToken
,
(
void
**
)
&
subtoken
);
if
(
FAILED
(
hr
))
...
...
@@ -773,6 +773,7 @@ static HRESULT WINAPI token_enum_Item( ISpObjectTokenEnumBuilder *iface,
object
=
impl_from_ISpObjectToken
(
subtoken
);
object
->
token_key
=
key
;
object
->
token_id
=
subkey
;
*
token
=
subtoken
;
...
...
@@ -928,6 +929,7 @@ static ULONG WINAPI token_Release( ISpObjectToken *iface )
if
(
!
ref
)
{
if
(
This
->
token_key
)
RegCloseKey
(
This
->
token_key
);
heap_free
(
This
->
token_id
);
heap_free
(
This
);
}
...
...
@@ -1054,8 +1056,27 @@ static HRESULT WINAPI token_SetId( ISpObjectToken *iface,
static
HRESULT
WINAPI
token_GetId
(
ISpObjectToken
*
iface
,
LPWSTR
*
token_id
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
struct
object_token
*
This
=
impl_from_ISpObjectToken
(
iface
);
TRACE
(
"%p, %p
\n
"
,
This
,
token_id
);
if
(
!
This
->
token_key
)
return
SPERR_UNINITIALIZED
;
if
(
!
token_id
)
return
E_POINTER
;
if
(
!
This
->
token_id
)
{
FIXME
(
"Loading default category not supported.
\n
"
);
return
E_POINTER
;
}
*
token_id
=
CoTaskMemAlloc
(
(
wcslen
(
This
->
token_id
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
!*
token_id
)
return
E_OUTOFMEMORY
;
wcscpy
(
*
token_id
,
This
->
token_id
);
return
S_OK
;
}
static
HRESULT
WINAPI
token_GetCategory
(
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