qcap: Always return S_FALSE from DllCanUnloadNow().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9a4a722fcc
commit
d3cd3ebc3c
|
@ -131,7 +131,6 @@ static void avi_mux_destroy(struct strmbase_filter *iface)
|
|||
free(filter->idx1);
|
||||
strmbase_filter_cleanup(&filter->filter);
|
||||
free(filter);
|
||||
ObjectRefCount(FALSE);
|
||||
}
|
||||
|
||||
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)
|
|||
avimux->interleave = 10000000;
|
||||
|
||||
TRACE("Created AVI mux %p.\n", avimux);
|
||||
ObjectRefCount(TRUE);
|
||||
*out = &avimux->filter.IUnknown_inner;
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -66,7 +66,6 @@ HRESULT capture_graph_create(IUnknown *outer, IUnknown **out)
|
|||
object->csFilter.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": CaptureGraphImpl.csFilter");
|
||||
|
||||
TRACE("Created capture graph builder %p.\n", object);
|
||||
ObjectRefCount(TRUE);
|
||||
*out = (IUnknown *)&object->ICaptureGraphBuilder_iface;
|
||||
return S_OK;
|
||||
}
|
||||
|
@ -123,7 +122,6 @@ static ULONG WINAPI fnCaptureGraphBuilder2_Release(ICaptureGraphBuilder2 * iface
|
|||
if (This->mygraph)
|
||||
IGraphBuilder_Release(This->mygraph);
|
||||
free(This);
|
||||
ObjectRefCount(FALSE);
|
||||
}
|
||||
return ref;
|
||||
}
|
||||
|
|
|
@ -29,8 +29,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
|
|||
|
||||
HINSTANCE qcap_instance;
|
||||
|
||||
static LONG objects_ref = 0;
|
||||
|
||||
struct class_factory
|
||||
{
|
||||
IClassFactory IClassFactory_iface;
|
||||
|
@ -91,11 +89,6 @@ static HRESULT WINAPI class_factory_CreateInstance(IClassFactory *iface, IUnknow
|
|||
static HRESULT WINAPI class_factory_LockServer(IClassFactory *iface, BOOL lock)
|
||||
{
|
||||
TRACE("iface %p, lock %d.\n", iface, lock);
|
||||
|
||||
if (lock)
|
||||
InterlockedIncrement(&objects_ref);
|
||||
else
|
||||
InterlockedDecrement(&objects_ref);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -274,20 +267,3 @@ HRESULT WINAPI DllUnregisterServer(void)
|
|||
IFilterMapper2_Release(mapper);
|
||||
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 @@
|
|||
|
||||
extern HINSTANCE qcap_instance DECLSPEC_HIDDEN;
|
||||
|
||||
extern DWORD ObjectRefCount(BOOL increment) DECLSPEC_HIDDEN;
|
||||
|
||||
HRESULT audio_record_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;
|
||||
|
|
|
@ -107,7 +107,6 @@ static void vfw_capture_destroy(struct strmbase_filter *iface)
|
|||
strmbase_source_cleanup(&filter->source);
|
||||
strmbase_filter_cleanup(&filter->filter);
|
||||
free(filter);
|
||||
ObjectRefCount(FALSE);
|
||||
}
|
||||
|
||||
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)
|
|||
object->state_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": vfw_capture.state_cs");
|
||||
|
||||
TRACE("Created VFW capture filter %p.\n", object);
|
||||
ObjectRefCount(TRUE);
|
||||
*out = &object->filter.IUnknown_inner;
|
||||
return S_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue