30#define QI_SUCCEED(iface, riid, ppv) hr = IUnknown_QueryInterface(iface, &riid, (LPVOID*)&ppv); \
31 ok(hr == S_OK, "IUnknown_QueryInterface returned %x\n", hr); \
32 ok(ppv != NULL, "Pointer is NULL\n");
34#define RELEASE_EXPECT(iface, num) if (iface) { \
35 hr = IUnknown_Release((IUnknown*)iface); \
36 ok(hr == num, "IUnknown_Release should return %d, got %d\n", num, hr); \
55 ok(
hr == 0,
"IUnknown_Release failed with %x\n",
hr);
60 ok(0,
"Should not be called\n");
67 ok(0,
"Should not be called\n");
73 ok(0,
"Should not be called\n");
79 static const WCHAR dsguid[] = {
'D',
'S',
'G',
'u',
'i',
'd', 0 };
83 trace(
"Trying to read %s, type %u\n",
temp,
var->n1.n2.vt);
86 static const WCHAR defaultplayback[] =
88 '{',
'D',
'E',
'F',
'0',
'0',
'0',
'0',
'0',
'-',
89 '9',
'C',
'6',
'D',
'-',
'4',
'7',
'E',
'D',
'-',
90 'A',
'A',
'F',
'1',
'-',
'4',
'D',
'D',
'A',
'8',
91 'F',
'2',
'B',
'5',
'C',
'0',
'3',
'}',0
97 ok(0,
"Unknown property '%s' queried\n",
temp);
103 ok(0,
"Should not be called\n");
120 IBasicAudio *pBasicAudio =
NULL;
121 IMediaPosition *pMediaPosition =
NULL;
125 IDirectSound3DBuffer *ds3dbuf =
NULL;
127 IAMDirectSound *pAMDirectSound =
NULL;
146 hr = IPersistPropertyBag_Load(ppb, &bag,
NULL);
147 ok(
hr ==
S_OK,
"Couldn't load default device: %08x\n",
hr);
161 IPin_QueryInterface(
pin, &IID_IMemInputPin, (
void **)&mpin);
163 ok(mpin !=
NULL,
"No IMemInputPin found!\n");
166 ok(IMemInputPin_ReceiveCanBlock(mpin) ==
S_OK,
"Receive can't block for pin!\n");
167 ok(IMemInputPin_NotifyAllocator(mpin,
NULL, 0) ==
E_POINTER,
"NotifyAllocator likes a NULL pointer argument\n");
168 IMemInputPin_Release(mpin);
185 skip(
"No IBaseFilter\n");
192 hr= IBaseFilter_EnumPins(
base, &pin_enum);
193 ok(
hr ==
S_OK,
"hr = %08x and not S_OK\n",
hr);
198 hr = IEnumPins_Next(pin_enum, 2, pins,
NULL);
201 pins[0] = (
void *)0xdead;
202 pins[1] = (
void *)0xdeed;
204 hr = IEnumPins_Next(pin_enum, 2, pins, &
ref);
206 ok(pins[0] != (
void *)0xdead && pins[0] !=
NULL,
"pins[0] = %p\n", pins[0]);
207 if (pins[0] != (
void *)0xdead && pins[0] !=
NULL)
210 IPin_Release(pins[0]);
213 ok(pins[1] == (
void *)0xdeed,
"pins[1] = %p\n", pins[1]);
215 ref = IEnumPins_Release(pin_enum);
216 ok(
ref == 0,
"ref is %u and not 0!\n",
ref);
218 IBaseFilter_Release(
base);
const GUID IID_IBaseFilter
#define WideCharToMultiByte
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
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)
static HRESULT WINAPI PB_Write(IPropertyBag *iface, LPCOLESTR name, VARIANT *var)
static IUnknown * pDSRender
static BOOL create_dsound_renderer(void)
#define RELEASE_EXPECT(iface, num)
static IPropertyBagVtbl PB_Vtbl
static void release_dsound_renderer(void)
static void test_pin(IPin *pin)
static ULONG WINAPI PB_AddRef(IPropertyBag *iface)
static void test_query_interface(void)
static HRESULT WINAPI PB_Read(IPropertyBag *iface, LPCOLESTR name, VARIANT *var, IErrorLog *log)
#define QI_SUCCEED(iface, riid, ppv)
static HRESULT WINAPI PB_QueryInterface(IPropertyBag *iface, REFIID riid, void **ppv)
static ULONG WINAPI PB_Release(IPropertyBag *iface)
static void test_basefilter(void)
BSTR WINAPI SysAllocString(LPCOLESTR str)
const GUID IID_IPersistPropertyBag
_Check_return_ _CRTIMP clock_t __cdecl clock(void)