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
0f8b59a2
Commit
0f8b59a2
authored
Feb 15, 2024
by
Shaun Ren
Committed by
Alexandre Julliard
Feb 20, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sapi: Introduce create_token_category helper in tts.
parent
4bbfd838
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
tts.c
dlls/sapi/tts.c
+13
-8
No files found.
dlls/sapi/tts.c
View file @
0f8b59a2
...
...
@@ -82,6 +82,15 @@ static inline struct tts_engine_site *impl_from_ISpTTSEngineSite(ISpTTSEngineSit
return
CONTAINING_RECORD
(
iface
,
struct
tts_engine_site
,
ISpTTSEngineSite_iface
);
}
static
HRESULT
create_token_category
(
const
WCHAR
*
cat_id
,
ISpObjectTokenCategory
**
cat
)
{
HRESULT
hr
;
if
(
FAILED
(
hr
=
CoCreateInstance
(
&
CLSID_SpObjectTokenCategory
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpObjectTokenCategory
,
(
void
**
)
cat
)))
return
hr
;
return
ISpObjectTokenCategory_SetId
(
*
cat
,
cat_id
,
FALSE
);
}
static
HRESULT
create_default_token
(
const
WCHAR
*
cat_id
,
ISpObjectToken
**
token
)
{
ISpObjectTokenCategory
*
cat
;
...
...
@@ -90,17 +99,13 @@ static HRESULT create_default_token(const WCHAR *cat_id, ISpObjectToken **token)
TRACE
(
"(%s, %p).
\n
"
,
debugstr_w
(
cat_id
),
token
);
if
(
FAILED
(
hr
=
CoCreateInstance
(
&
CLSID_SpObjectTokenCategory
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpObjectTokenCategory
,
(
void
**
)
&
cat
)))
if
(
FAILED
(
hr
=
create_token_category
(
cat_id
,
&
cat
)))
return
hr
;
if
(
FAILED
(
hr
=
ISpObjectTokenCategory_SetId
(
cat
,
cat_id
,
FALSE
))
||
FAILED
(
hr
=
ISpObjectTokenCategory_GetDefaultTokenId
(
cat
,
&
default_token_id
)))
{
ISpObjectTokenCategory_Release
(
cat
);
return
hr
;
}
hr
=
ISpObjectTokenCategory_GetDefaultTokenId
(
cat
,
&
default_token_id
);
ISpObjectTokenCategory_Release
(
cat
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
FAILED
(
hr
=
CoCreateInstance
(
&
CLSID_SpObjectToken
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ISpObjectToken
,
(
void
**
)
token
)))
...
...
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