38 return IUnknown_Release(
unknown);
41#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
50 hr = IUnknown_QueryInterface(iface, iid, (
void **)&unk);
53 IUnknown_Release(unk);
79 IBaseFilter_FindPin(
filter,
L"In", &pin);
91 IBaseFilter_FindPin(
filter,
L"Out", &pin);
103 IBaseFilter_Release(
filter);
158 ok(unk != &
test_outer,
"Returned IUnknown should not be outer IUnknown.\n");
160 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
162 ref = IUnknown_AddRef(unk);
163 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
166 ref = IUnknown_Release(unk);
167 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
172 ok(unk2 == unk,
"Got unexpected IUnknown %p.\n", unk2);
173 IUnknown_Release(unk2);
180 ok(unk2 == (
IUnknown *)0xdeadbeef,
"Got unexpected IUnknown %p.\n", unk2);
184 ok(filter2 == (
IBaseFilter *)0xdeadbeef,
"Got unexpected IBaseFilter %p.\n", filter2);
186 hr = IUnknown_QueryInterface(unk, &
test_iid, (
void **)&unk2);
188 ok(!unk2,
"Got unexpected IUnknown %p.\n", unk2);
192 ok(unk2 == (
IUnknown *)0xdeadbeef,
"Got unexpected IUnknown %p.\n", unk2);
194 IBaseFilter_Release(
filter);
195 ref = IUnknown_Release(unk);
196 ok(!
ref,
"Got unexpected refcount %ld.\n",
ref);
209 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
214 hr = IBaseFilter_EnumPins(
filter, &enum1);
217 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
219 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
224 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
227 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
229 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
231 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
232 IPin_Release(pins[0]);
234 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
236 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
239 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
241 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
243 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
244 IPin_Release(pins[0]);
246 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
248 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
251 hr = IEnumPins_Reset(enum1);
254 hr = IEnumPins_Next(enum1, 1, pins, &
count);
257 IPin_Release(pins[0]);
259 hr = IEnumPins_Next(enum1, 1, pins, &
count);
262 IPin_Release(pins[0]);
264 hr = IEnumPins_Next(enum1, 1, pins, &
count);
268 hr = IEnumPins_Reset(enum1);
271 hr = IEnumPins_Next(enum1, 2, pins,
NULL);
274 hr = IEnumPins_Next(enum1, 2, pins, &
count);
277 IPin_Release(pins[0]);
278 IPin_Release(pins[1]);
280 hr = IEnumPins_Next(enum1, 2, pins, &
count);
284 hr = IEnumPins_Reset(enum1);
287 hr = IEnumPins_Next(enum1, 3, pins, &
count);
290 IPin_Release(pins[0]);
291 IPin_Release(pins[1]);
293 hr = IEnumPins_Reset(enum1);
296 hr = IEnumPins_Clone(enum1, &enum2);
299 hr = IEnumPins_Skip(enum1, 3);
302 hr = IEnumPins_Skip(enum1, 2);
305 hr = IEnumPins_Skip(enum1, 1);
308 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
311 hr = IEnumPins_Next(enum2, 1, pins,
NULL);
313 IPin_Release(pins[0]);
315 IEnumPins_Release(enum2);
316 IEnumPins_Release(enum1);
318 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
332 hr = IBaseFilter_FindPin(
filter,
L"In", &pin);
336 ok(pin == pin2,
"Pins didn't match.\n");
340 hr = IBaseFilter_FindPin(
filter,
L"Out", &pin);
344 ok(pin == pin2,
"Pins didn't match.\n");
348 hr = IBaseFilter_FindPin(
filter,
L"Input", &pin);
350 hr = IBaseFilter_FindPin(
filter,
L"Output", &pin);
352 hr = IBaseFilter_FindPin(
filter,
L"input pin", &pin);
354 hr = IBaseFilter_FindPin(
filter,
L"output pin", &pin);
359 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
372 hr = IBaseFilter_FindPin(
filter,
L"In", &pin);
375 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
377 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
379 hr = IPin_QueryPinInfo(pin, &
info);
385 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
387 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
388 IBaseFilter_Release(
info.pFilter);
390 hr = IPin_QueryDirection(pin, &
dir);
394 hr = IPin_QueryId(pin, &
id);
399 hr = IPin_QueryInternalConnections(pin,
NULL,
NULL);
404 hr = IBaseFilter_FindPin(
filter,
L"Out", &pin);
410 hr = IPin_QueryPinInfo(pin, &
info);
415 IBaseFilter_Release(
info.pFilter);
417 hr = IPin_QueryDirection(pin, &
dir);
421 hr = IPin_QueryId(pin, &
id);
426 hr = IPin_QueryInternalConnections(pin,
NULL,
NULL);
432 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
489 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
#define InterlockedIncrement
#define InterlockedDecrement
enum _PinDirection PIN_DIRECTION
const GUID IID_IKsPropertySet
const GUID IID_IBaseFilter
const GUID IID_IAsyncReader
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
void WINAPI CoTaskMemFree(void *ptr)
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
GLuint GLuint GLsizei count
static const IUnknownVtbl outer_vtbl
static IBaseFilter * create_acm_wrapper(void)
static void test_aggregation(void)
static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOOL supported)
static ULONG WINAPI outer_AddRef(IUnknown *iface)
static HRESULT WINAPI outer_QueryInterface(IUnknown *iface, REFIID iid, void **out)
static ULONG get_refcount(void *iface)
static void test_pin_info(void)
static IUnknown test_outer
static void test_find_pin(void)
static void test_interfaces(void)
static void test_enum_pins(void)
#define check_interface(a, b, c)
static void test_unconnected_filter_state(void)
static const GUID test_iid
static ULONG WINAPI outer_Release(IUnknown *iface)
const GUID IID_IPersistPropertyBag
#define IsEqualGUID(rguid1, rguid2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out