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
6f2a0c41
Commit
6f2a0c41
authored
Feb 06, 2024
by
Shaun Ren
Committed by
Alexandre Julliard
Feb 13, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sapi: Implement IEnumVARIANT::Next for ISpeechObjectTokens.
parent
261d7c3d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
2 deletions
+63
-2
token.c
dlls/sapi/tests/token.c
+28
-0
token.c
dlls/sapi/token.c
+35
-2
No files found.
dlls/sapi/tests/token.c
View file @
6f2a0c41
...
...
@@ -256,6 +256,7 @@ static void test_token_enum(void)
ISpObjectToken
*
out_tokens
[
5
];
WCHAR
token_id
[
MAX_PATH
];
ULONG
count
;
VARIANT
vars
[
3
];
int
i
;
hr
=
CoCreateInstance
(
&
CLSID_SpObjectTokenEnum
,
NULL
,
CLSCTX_INPROC_SERVER
,
...
...
@@ -372,6 +373,33 @@ static void test_token_enum(void)
hr
=
IUnknown_QueryInterface
(
unk
,
&
IID_IEnumVARIANT
,
(
void
**
)
&
enumvar
);
ok
(
hr
==
S_OK
,
"got %08lx
\n
"
,
hr
);
IUnknown_Release
(
unk
);
V_VT
(
&
vars
[
0
]
)
=
VT_ILLEGAL
;
V_DISPATCH
(
&
vars
[
0
]
)
=
(
IDispatch
*
)
0xdeadbeef
;
hr
=
IEnumVARIANT_Next
(
enumvar
,
1
,
vars
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08lx
\n
"
,
hr
);
ok
(
V_VT
(
&
vars
[
0
]
)
==
VT_DISPATCH
,
"got %#x
\n
"
,
V_VT
(
&
vars
[
0
]
)
);
ok
(
V_DISPATCH
(
&
vars
[
0
]
)
!=
(
IDispatch
*
)
0xdeadbeef
&&
V_DISPATCH
(
&
vars
[
0
]
)
!=
NULL
,
"got %p
\n
"
,
V_DISPATCH
(
&
vars
[
0
]
)
);
VariantClear
(
&
vars
[
0
]
);
for
(
i
=
0
;
i
<
3
;
i
++
)
{
V_VT
(
&
vars
[
i
]
)
=
VT_ILLEGAL
;
V_DISPATCH
(
&
vars
[
i
]
)
=
(
IDispatch
*
)
0xdeadbeef
;
}
count
=
0xdeadbeef
;
hr
=
IEnumVARIANT_Next
(
enumvar
,
3
,
vars
,
&
count
);
ok
(
hr
==
S_FALSE
,
"got %08lx
\n
"
,
hr
);
ok
(
count
==
2
,
"got %lu
\n
"
,
count
);
for
(
i
=
0
;
i
<
2
;
i
++
)
{
ok
(
V_VT
(
&
vars
[
i
]
)
==
VT_DISPATCH
,
"got %#x
\n
"
,
V_VT
(
&
vars
[
i
]
)
);
ok
(
V_DISPATCH
(
&
vars
[
i
]
)
!=
(
IDispatch
*
)
0xdeadbeef
&&
V_DISPATCH
(
&
vars
[
i
]
)
!=
NULL
,
"got %p
\n
"
,
V_DISPATCH
(
&
vars
[
i
]
)
);
VariantClear
(
&
vars
[
i
]
);
}
ok
(
V_VT
(
&
vars
[
2
]
)
==
VT_ILLEGAL
,
"got %#x
\n
"
,
V_VT
(
&
vars
[
2
]
)
);
IEnumVARIANT_Release
(
enumvar
);
ISpeechObjectTokens_Release
(
speech_tokens
);
...
...
dlls/sapi/token.c
View file @
6f2a0c41
...
...
@@ -1206,8 +1206,41 @@ static ULONG WINAPI enum_var_Release( IEnumVARIANT *iface )
static
HRESULT
WINAPI
enum_var_Next
(
IEnumVARIANT
*
iface
,
ULONG
count
,
VARIANT
*
vars
,
ULONG
*
fetched
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
struct
enum_var
*
This
=
impl_from_IEnumVARIANT
(
iface
);
ULONG
i
,
total
;
HRESULT
hr
;
TRACE
(
"(%p)->(%lu %p %p)
\n
"
,
This
,
count
,
vars
,
fetched
);
if
(
fetched
)
*
fetched
=
0
;
if
(
FAILED
(
hr
=
ISpObjectTokenEnumBuilder_GetCount
(
This
->
token_enum
,
&
total
)))
return
hr
;
for
(
i
=
0
;
i
<
count
&&
This
->
index
<
total
;
i
++
,
This
->
index
++
)
{
ISpObjectToken
*
token
;
IDispatch
*
disp
;
if
(
FAILED
(
hr
=
ISpObjectTokenEnumBuilder_Item
(
This
->
token_enum
,
This
->
index
,
&
token
)))
goto
fail
;
hr
=
ISpObjectToken_QueryInterface
(
token
,
&
IID_IDispatch
,
(
void
**
)
&
disp
);
ISpObjectToken_Release
(
token
);
if
(
FAILED
(
hr
))
goto
fail
;
VariantInit
(
&
vars
[
i
]
);
V_VT
(
&
vars
[
i
]
)
=
VT_DISPATCH
;
V_DISPATCH
(
&
vars
[
i
]
)
=
disp
;
}
if
(
fetched
)
*
fetched
=
i
;
return
i
==
count
?
S_OK
:
S_FALSE
;
fail:
while
(
i
--
)
VariantClear
(
&
vars
[
i
]
);
return
hr
;
}
static
HRESULT
WINAPI
enum_var_Skip
(
IEnumVARIANT
*
iface
,
ULONG
count
)
...
...
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