* Sync with Wine 1.7.27.
CORE-8540
svn path=/trunk/; revision=64306
get_connected_filter_name(ptestfilter, ConnectedFilterName1);
ok(!strcmp(ConnectedFilterName1, "TestfilterInstance3"),
"unexpected connected filter: %s\n", ConnectedFilterName1);
- }
- hr = IFilterMapper2_UnregisterFilter(pMapper2, &CLSID_LegacyAmFilterCategory, NULL,
- &CLSID_TestFilter2);
- ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %x\n", hr);
- hr = IFilterMapper2_UnregisterFilter(pMapper2, &CLSID_LegacyAmFilterCategory, NULL,
- &CLSID_TestFilter3);
- ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %x\n", hr);
- hr = IFilterMapper2_UnregisterFilter(pMapper2, &CLSID_LegacyAmFilterCategory, NULL,
- &CLSID_TestFilter4);
- ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %x\n", hr);
+ hr = IFilterMapper2_UnregisterFilter(pMapper2, &CLSID_LegacyAmFilterCategory, NULL,
+ &CLSID_TestFilter2);
+ ok(hr == S_OK, "IFilterMapper2_UnregisterFilter failed with %x\n", hr);
+ hr = IFilterMapper2_UnregisterFilter(pMapper2, &CLSID_LegacyAmFilterCategory, NULL,
+ &CLSID_TestFilter3);
+ ok(hr == S_OK, "IFilterMapper2_UnregisterFilter failed with %x\n", hr);
+ hr = IFilterMapper2_UnregisterFilter(pMapper2, &CLSID_LegacyAmFilterCategory, NULL,
+ &CLSID_TestFilter4);
+ ok(hr == S_OK, "IFilterMapper2_UnregisterFilter failed with %x\n", hr);
+ }
out:
START_TEST(filtergraph)
{
HRESULT hr;
-
CoInitializeEx(NULL, COINIT_MULTITHREADED);
hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER,
&IID_IGraphBuilder, (LPVOID*)&pgraph);
skip("Creating filtergraph returned %08x, skipping tests\n", hr);
return;
}
+ IGraphBuilder_Release(pgraph);
test_render_run(avifile);
test_render_run(mpegfile);
test_graph_builder();
{
CHAR val1[512], val2[512];
- WideCharToMultiByte(CP_ACP, 0, V_UNION(&var, bstrVal), -1, val1, sizeof(val1), 0, 0);
+ WideCharToMultiByte(CP_ACP, 0, V_BSTR(&var), -1, val1, sizeof(val1), 0, 0);
WideCharToMultiByte(CP_ACP, 0, wszFilterName, -1, val2, sizeof(val2), 0, 0);
if (!lstrcmpA(val1, val2)) found = TRUE;
}
CLSID clsidFilter1;
CLSID clsidFilter2;
IEnumMoniker *pEnum = NULL;
- BOOL found;
+ BOOL found, registered = TRUE;
ZeroMemory(&rgf2, sizeof(rgf2));
hr = IFilterMapper2_RegisterFilter(pMapper, &clsidFilter1, wszFilterName1, NULL,
&CLSID_LegacyAmFilterCategory, NULL, &rgf2);
if (hr == E_ACCESSDENIED)
+ {
+ registered = FALSE;
skip("Not authorized to register filters\n");
+ }
else
{
ok(hr == S_OK, "IFilterMapper2_RegisterFilter failed with %x\n", hr);
ok(!found, "EnumMatchingFilters should not return the test filter 2\n");
}
- hr = IFilterMapper2_UnregisterFilter(pMapper, &CLSID_LegacyAmFilterCategory, NULL,
- &clsidFilter1);
- ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %x\n", hr);
+ if (registered)
+ {
+ hr = IFilterMapper2_UnregisterFilter(pMapper, &CLSID_LegacyAmFilterCategory, NULL,
+ &clsidFilter1);
+ ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %x\n", hr);
- hr = IFilterMapper2_UnregisterFilter(pMapper, &CLSID_LegacyAmFilterCategory, NULL,
- &clsidFilter2);
- ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %x\n", hr);
+ hr = IFilterMapper2_UnregisterFilter(pMapper, &CLSID_LegacyAmFilterCategory, NULL,
+ &clsidFilter2);
+ ok(SUCCEEDED(hr), "IFilterMapper2_UnregisterFilter failed with %x\n", hr);
+ }
out:
static void test_IReferenceClock_query_interface(const char * clockdesc, IReferenceClock * pClock)
{
HRESULT hr;
- IUnknown *pF;
+ void *pF;
- hr = IReferenceClock_QueryInterface(pClock, &IID_IUnknown, (LPVOID *)&pF);
+ hr = IReferenceClock_QueryInterface(pClock, &IID_IUnknown, &pF);
ok(hr == S_OK, "IReferenceClock_QueryInterface returned %x\n", hr);
ok(pF != NULL, "pF is NULL\n");
+ if (SUCCEEDED(hr)) IUnknown_Release((IUnknown *)pF);
- hr = IReferenceClock_QueryInterface(pClock, &IID_IDirectDraw, (LPVOID *)&pF);
+ hr = IReferenceClock_QueryInterface(pClock, &IID_IDirectDraw, &pF);
ok(hr == E_NOINTERFACE, "IReferenceClock_QueryInterface returned %x\n", hr);
ok(pF == NULL, "pF is not NULL\n");
- hr = IReferenceClock_QueryInterface(pClock, &IID_IReferenceClock, (LPVOID *)&pF);
+ hr = IReferenceClock_QueryInterface(pClock, &IID_IReferenceClock, &pF);
ok(hr == S_OK, "IReferenceClock_QueryInterface returned %x\n", hr);
ok(pF != NULL, "pF is NULL\n");
+ if (SUCCEEDED(hr)) IReferenceClock_Release((IReferenceClock *)pF);
}
/* The following method expects a reference clock that will keep ticking for