26#define QI_SUCCEED(iface, riid, ppv) hr = IUnknown_QueryInterface(iface, &riid, (LPVOID*)&ppv); \
27 ok(hr == S_OK, "IUnknown_QueryInterface returned %x\n", hr); \
28 ok(ppv != NULL, "Pointer is NULL\n");
30#define QI_FAIL(iface, riid, ppv) hr = IUnknown_QueryInterface(iface, &riid, (LPVOID*)&ppv); \
31 ok(hr == E_NOINTERFACE, "IUnknown_QueryInterface returned %x\n", hr); \
32 ok(ppv == NULL, "Pointer is %p\n", ppv);
34#define ADDREF_EXPECT(iface, num) if (iface) { \
35 refCount = IUnknown_AddRef(iface); \
36 ok(refCount == num, "IUnknown_AddRef should return %d, got %d\n", num, refCount); \
39#define RELEASE_EXPECT(iface, num) if (iface) { \
40 refCount = IUnknown_Release(iface); \
41 ok(refCount == num, "IUnknown_Release should return %d, got %d\n", num, refCount); \
45 const IID iidOuter,
const IID iidInner)
60 ok(
hr ==
S_OK,
"CoCreateInstance failed with %x\n",
hr);
61 ok(pUnkOuter !=
NULL,
"pUnkOuter is NULL\n");
65 skip(
"pUnkOuter is NULL\n");
71 &iidInner, (
LPVOID*)&pUnkInnerFail);
74 skip(
"Class not registered\n");
78 ok(pUnkInnerFail ==
NULL,
"pUnkInnerFail is not NULL\n");
83 ok(
hr ==
S_OK,
"CoCreateInstance returned %x\n",
hr);
84 ok(pUnkInner !=
NULL,
"pUnkInner is NULL\n");
88 skip(
"pUnkInner is NULL\n");
97 QI_FAIL(pUnkOuter, iidInner, pUnkAggregatee);
98 QI_FAIL(pUnkInner, iidOuter, pUnkAggregator);
101 QI_SUCCEED(pUnkOuter, iidOuter, pUnkAggregator);
106 hr = IUnknown_QueryInterface(pUnkInner, &iidInner, (
LPVOID*)&pUnkAggregatee);
108 ok(pUnkAggregatee !=
NULL ||
broken(!pUnkAggregatee),
"Pointer is NULL\n");
112 QI_SUCCEED(pUnkInner, iidInner, pUnkAggregatee);
116 if (!pUnkAggregator || !pUnkOuterTest || !pUnkAggregatee
119 skip(
"One of the required interfaces is NULL\n");
137 QI_FAIL(pUnkAggregator, iidInner, pUnkTest);
138 QI_FAIL(pUnkOuterTest, iidInner, pUnkTest);
139 QI_FAIL(pUnkAggregatee, iidInner, pUnkTest);
140 QI_SUCCEED(pUnkInnerTest, iidInner, pUnkTest);
142 QI_SUCCEED(pUnkAggregator, iidOuter, pUnkTest);
143 QI_SUCCEED(pUnkOuterTest, iidOuter, pUnkTest);
144 QI_SUCCEED(pUnkAggregatee, iidOuter, pUnkTest);
145 QI_FAIL(pUnkInnerTest, iidOuter, pUnkTest);
156 refCount = IUnknown_Release(pUnkInner);
161 refCount = IUnknown_Release(pUnkOuter);
167 const IID * iids[] = {
172 for (
i = 0;
i <
sizeof(iids) /
sizeof(iids[0]);
i++)
174 test_aggregation(CLSID_SystemClock, CLSID_NullRenderer, IID_IReferenceClock, *iids[
i]);
180 const IID * iids[] = {
181 &IID_IMediaFilter, &
IID_IBaseFilter, &IID_IBasicVideo, &IID_IVideoWindow
185 for (
i = 0;
i <
sizeof(iids) /
sizeof(iids[0]);
i++)
188 IID_IReferenceClock, *iids[
i]);
194 const IID * iids[] = {
195 &IID_IFilterGraph2, &IID_IMediaControl, &IID_IGraphBuilder,
196 &IID_IFilterGraph, &IID_IMediaSeeking, &IID_IBasicAudio, &IID_IBasicVideo,
197 &IID_IVideoWindow, &IID_IMediaEventEx, &IID_IMediaFilter,
198 &IID_IMediaEventSink, &IID_IGraphConfig, &IID_IMediaPosition
202 for (
i = 0;
i <
sizeof(iids) /
sizeof(iids[0]);
i++)
205 IID_IReferenceClock, *iids[
i]);
211 const IID * iids[] = {
212 &IID_IFilterMapper2, &IID_IFilterMapper
216 for (
i = 0;
i <
sizeof(iids) /
sizeof(iids[0]);
i++)
219 IID_IReferenceClock, *iids[
i]);
const GUID IID_IBaseFilter
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static void test_aggregation(void)
static void test_null_renderer_aggregations(void)
static void test_filter_graph_aggregations(void)
static void test_video_renderer_aggregations(void)
#define RELEASE_EXPECT(iface, num)
#define QI_FAIL(iface, riid, ppv)
static void test_filter_mapper_aggregations(void)
#define QI_SUCCEED(iface, riid, ppv)
#define ADDREF_EXPECT(iface, num)
#define IsEqualGUID(rguid1, rguid2)
#define REGDB_E_CLASSNOTREG