Commit d3cd3ebc authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

qcap: Always return S_FALSE from DllCanUnloadNow().

parent 9a4a722f
...@@ -131,7 +131,6 @@ static void avi_mux_destroy(struct strmbase_filter *iface) ...@@ -131,7 +131,6 @@ static void avi_mux_destroy(struct strmbase_filter *iface)
free(filter->idx1); free(filter->idx1);
strmbase_filter_cleanup(&filter->filter); strmbase_filter_cleanup(&filter->filter);
free(filter); free(filter);
ObjectRefCount(FALSE);
} }
static HRESULT avi_mux_query_interface(struct strmbase_filter *iface, REFIID iid, void **out) static HRESULT avi_mux_query_interface(struct strmbase_filter *iface, REFIID iid, void **out)
...@@ -1851,7 +1850,6 @@ HRESULT avi_mux_create(IUnknown *outer, IUnknown **out) ...@@ -1851,7 +1850,6 @@ HRESULT avi_mux_create(IUnknown *outer, IUnknown **out)
avimux->interleave = 10000000; avimux->interleave = 10000000;
TRACE("Created AVI mux %p.\n", avimux); TRACE("Created AVI mux %p.\n", avimux);
ObjectRefCount(TRUE);
*out = &avimux->filter.IUnknown_inner; *out = &avimux->filter.IUnknown_inner;
return S_OK; return S_OK;
} }
...@@ -66,7 +66,6 @@ HRESULT capture_graph_create(IUnknown *outer, IUnknown **out) ...@@ -66,7 +66,6 @@ HRESULT capture_graph_create(IUnknown *outer, IUnknown **out)
object->csFilter.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": CaptureGraphImpl.csFilter"); object->csFilter.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": CaptureGraphImpl.csFilter");
TRACE("Created capture graph builder %p.\n", object); TRACE("Created capture graph builder %p.\n", object);
ObjectRefCount(TRUE);
*out = (IUnknown *)&object->ICaptureGraphBuilder_iface; *out = (IUnknown *)&object->ICaptureGraphBuilder_iface;
return S_OK; return S_OK;
} }
...@@ -123,7 +122,6 @@ static ULONG WINAPI fnCaptureGraphBuilder2_Release(ICaptureGraphBuilder2 * iface ...@@ -123,7 +122,6 @@ static ULONG WINAPI fnCaptureGraphBuilder2_Release(ICaptureGraphBuilder2 * iface
if (This->mygraph) if (This->mygraph)
IGraphBuilder_Release(This->mygraph); IGraphBuilder_Release(This->mygraph);
free(This); free(This);
ObjectRefCount(FALSE);
} }
return ref; return ref;
} }
......
...@@ -29,8 +29,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz); ...@@ -29,8 +29,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
HINSTANCE qcap_instance; HINSTANCE qcap_instance;
static LONG objects_ref = 0;
struct class_factory struct class_factory
{ {
IClassFactory IClassFactory_iface; IClassFactory IClassFactory_iface;
...@@ -91,11 +89,6 @@ static HRESULT WINAPI class_factory_CreateInstance(IClassFactory *iface, IUnknow ...@@ -91,11 +89,6 @@ static HRESULT WINAPI class_factory_CreateInstance(IClassFactory *iface, IUnknow
static HRESULT WINAPI class_factory_LockServer(IClassFactory *iface, BOOL lock) static HRESULT WINAPI class_factory_LockServer(IClassFactory *iface, BOOL lock)
{ {
TRACE("iface %p, lock %d.\n", iface, lock); TRACE("iface %p, lock %d.\n", iface, lock);
if (lock)
InterlockedIncrement(&objects_ref);
else
InterlockedDecrement(&objects_ref);
return S_OK; return S_OK;
} }
...@@ -274,20 +267,3 @@ HRESULT WINAPI DllUnregisterServer(void) ...@@ -274,20 +267,3 @@ HRESULT WINAPI DllUnregisterServer(void)
IFilterMapper2_Release(mapper); IFilterMapper2_Release(mapper);
return S_OK; return S_OK;
} }
/***********************************************************************
* DllCanUnloadNow (QCAP.@)
*/
HRESULT WINAPI DllCanUnloadNow(void)
{
TRACE(".\n");
return objects_ref ? S_FALSE : S_OK;
}
DWORD ObjectRefCount(BOOL increment)
{
if (increment)
return InterlockedIncrement(&objects_ref);
return InterlockedDecrement(&objects_ref);
}
...@@ -30,8 +30,6 @@ ...@@ -30,8 +30,6 @@
extern HINSTANCE qcap_instance DECLSPEC_HIDDEN; extern HINSTANCE qcap_instance DECLSPEC_HIDDEN;
extern DWORD ObjectRefCount(BOOL increment) DECLSPEC_HIDDEN;
HRESULT audio_record_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; HRESULT audio_record_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
HRESULT avi_compressor_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; HRESULT avi_compressor_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
HRESULT avi_mux_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN; HRESULT avi_mux_create(IUnknown *outer, IUnknown **out) DECLSPEC_HIDDEN;
......
...@@ -107,7 +107,6 @@ static void vfw_capture_destroy(struct strmbase_filter *iface) ...@@ -107,7 +107,6 @@ static void vfw_capture_destroy(struct strmbase_filter *iface)
strmbase_source_cleanup(&filter->source); strmbase_source_cleanup(&filter->source);
strmbase_filter_cleanup(&filter->filter); strmbase_filter_cleanup(&filter->filter);
free(filter); free(filter);
ObjectRefCount(FALSE);
} }
static HRESULT vfw_capture_query_interface(struct strmbase_filter *iface, REFIID iid, void **out) static HRESULT vfw_capture_query_interface(struct strmbase_filter *iface, REFIID iid, void **out)
...@@ -861,7 +860,6 @@ HRESULT vfw_capture_create(IUnknown *outer, IUnknown **out) ...@@ -861,7 +860,6 @@ HRESULT vfw_capture_create(IUnknown *outer, IUnknown **out)
object->state_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": vfw_capture.state_cs"); object->state_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": vfw_capture.state_cs");
TRACE("Created VFW capture filter %p.\n", object); TRACE("Created VFW capture filter %p.\n", object);
ObjectRefCount(TRUE);
*out = &object->filter.IUnknown_inner; *out = &object->filter.IUnknown_inner;
return S_OK; return S_OK;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment