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
4bc76025
Commit
4bc76025
authored
Jul 17, 2008
by
Alexander Dorofeyev
Committed by
Alexandre Julliard
Jul 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/tests: Test querying IFilterMapper2 from FilterGraph.
parent
0bea470d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
filtermapper.c
dlls/quartz/tests/filtermapper.c
+58
-0
No files found.
dlls/quartz/tests/filtermapper.c
View file @
4bc76025
...
@@ -286,12 +286,70 @@ static void test_legacy_filter_registration(void)
...
@@ -286,12 +286,70 @@ static void test_legacy_filter_registration(void)
if
(
pMapper2
)
IFilterMapper2_Release
(
pMapper2
);
if
(
pMapper2
)
IFilterMapper2_Release
(
pMapper2
);
}
}
static
ULONG
getRefcount
(
IUnknown
*
iface
)
{
IUnknown_AddRef
(
iface
);
return
IUnknown_Release
(
iface
);
}
static
void
test_ifiltermapper_from_filtergraph
(
void
)
{
IFilterGraph2
*
pgraph2
=
NULL
;
IFilterMapper2
*
pMapper2
=
NULL
;
IFilterGraph
*
filtergraph
=
NULL
;
HRESULT
hr
;
ULONG
refcount
;
hr
=
CoCreateInstance
(
&
CLSID_FilterGraph
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IFilterGraph2
,
(
LPVOID
*
)
&
pgraph2
);
ok
(
hr
==
S_OK
,
"CoCreateInstance failed with %08x
\n
"
,
hr
);
if
(
!
pgraph2
)
goto
out
;
hr
=
IFilterGraph2_QueryInterface
(
pgraph2
,
&
IID_IFilterMapper2
,
(
LPVOID
*
)
&
pMapper2
);
ok
(
hr
==
S_OK
,
"IFilterGraph2_QueryInterface failed with %08x
\n
"
,
hr
);
if
(
!
pMapper2
)
goto
out
;
refcount
=
getRefcount
((
IUnknown
*
)
pgraph2
);
ok
(
refcount
==
2
,
"unexpected reference count: %u
\n
"
,
refcount
);
refcount
=
getRefcount
((
IUnknown
*
)
pMapper2
);
ok
(
refcount
==
2
,
"unexpected reference count: %u
\n
"
,
refcount
);
IFilterMapper2_AddRef
(
pMapper2
);
refcount
=
getRefcount
((
IUnknown
*
)
pgraph2
);
ok
(
refcount
==
3
,
"unexpected reference count: %u
\n
"
,
refcount
);
refcount
=
getRefcount
((
IUnknown
*
)
pMapper2
);
ok
(
refcount
==
3
,
"unexpected reference count: %u
\n
"
,
refcount
);
IFilterMapper2_Release
(
pMapper2
);
hr
=
IFilterMapper2_QueryInterface
(
pMapper2
,
&
IID_IFilterGraph
,
(
LPVOID
*
)
&
filtergraph
);
ok
(
hr
==
S_OK
,
"IFilterMapper2_QueryInterface failed with %08x
\n
"
,
hr
);
if
(
!
filtergraph
)
goto
out
;
IFilterMapper2_Release
(
pMapper2
);
pMapper2
=
NULL
;
IFilterGraph_Release
(
filtergraph
);
filtergraph
=
NULL
;
hr
=
CoCreateInstance
(
&
CLSID_FilterMapper2
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IFilterMapper2
,
(
LPVOID
*
)
&
pMapper2
);
ok
(
hr
==
S_OK
,
"CoCreateInstance failed with %08x
\n
"
,
hr
);
if
(
!
pMapper2
)
goto
out
;
hr
=
IFilterMapper2_QueryInterface
(
pMapper2
,
&
IID_IFilterGraph
,
(
LPVOID
*
)
&
filtergraph
);
ok
(
hr
==
E_NOINTERFACE
,
"IFilterMapper2_QueryInterface unexpected result: %08x
\n
"
,
hr
);
out:
if
(
pMapper2
)
IFilterMapper2_Release
(
pMapper2
);
if
(
filtergraph
)
IFilterGraph_Release
(
filtergraph
);
if
(
pgraph2
)
IFilterGraph2_Release
(
pgraph2
);
}
START_TEST
(
filtermapper
)
START_TEST
(
filtermapper
)
{
{
CoInitialize
(
NULL
);
CoInitialize
(
NULL
);
test_fm2_enummatchingfilters
();
test_fm2_enummatchingfilters
();
test_legacy_filter_registration
();
test_legacy_filter_registration
();
test_ifiltermapper_from_filtergraph
();
CoUninitialize
();
CoUninitialize
();
}
}
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