quartz: 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:
Zebediah Figura 2021-08-25 17:10:36 -05:00 committed by Alexandre Julliard
parent 4a18232e45
commit 9a4a722fcc
13 changed files with 4 additions and 52 deletions

View File

@ -484,8 +484,6 @@ static void acm_wrapper_destroy(struct strmbase_filter *iface)
FreeMediaType(&filter->mt);
strmbase_filter_cleanup(&filter->filter);
free(filter);
InterlockedDecrement(&object_locks);
}
static HRESULT acm_wrapper_init_stream(struct strmbase_filter *iface)

View File

@ -538,8 +538,6 @@ static void avi_decompressor_destroy(struct strmbase_filter *iface)
strmbase_filter_cleanup(&filter->filter);
free(filter);
InterlockedDecrement(&object_locks);
}
static HRESULT avi_decompressor_init_stream(struct strmbase_filter *iface)

View File

@ -549,8 +549,6 @@ static void dsound_render_destroy(struct strmbase_filter *iface)
strmbase_passthrough_cleanup(&filter->passthrough);
strmbase_filter_cleanup(&filter->filter);
free(filter);
InterlockedDecrement(&object_locks);
}
static struct strmbase_pin *dsound_render_get_pin(struct strmbase_filter *iface, unsigned int index)

View File

@ -351,8 +351,6 @@ static void async_reader_destroy(struct strmbase_filter *iface)
strmbase_filter_cleanup(&filter->filter);
free(filter);
InterlockedDecrement(&object_locks);
}
static HRESULT async_reader_query_interface(struct strmbase_filter *iface, REFIID iid, void **out)

View File

@ -475,8 +475,6 @@ static ULONG WINAPI FilterGraphInner_Release(IUnknown *iface)
DeleteCriticalSection(&This->event_cs);
DeleteCriticalSection(&This->cs);
free(This);
InterlockedDecrement(&object_locks);
}
return ref;
}

View File

@ -487,8 +487,6 @@ static ULONG WINAPI Inner_Release(IUnknown *iface)
if (ref == 0)
{
CoTaskMemFree(This);
InterlockedDecrement(&object_locks);
}
return ref;

View File

@ -24,11 +24,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
extern HRESULT WINAPI QUARTZ_DllGetClassObject(REFCLSID, REFIID, LPVOID *) DECLSPEC_HIDDEN;
extern HRESULT WINAPI QUARTZ_DllCanUnloadNow(void) DECLSPEC_HIDDEN;
extern BOOL WINAPI QUARTZ_DllMain(HINSTANCE, DWORD, LPVOID) DECLSPEC_HIDDEN;
LONG object_locks = 0;
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
{
if (reason == DLL_PROCESS_DETACH && !reserved)
@ -127,21 +124,15 @@ static HRESULT WINAPI DSCF_CreateInstance(IClassFactory *iface, IUnknown *pOuter
if (SUCCEEDED(hres = This->create_instance(pOuter, &punk)))
{
InterlockedIncrement(&object_locks);
hres = IUnknown_QueryInterface(punk, riid, ppobj);
IUnknown_Release(punk);
}
return hres;
}
static HRESULT WINAPI DSCF_LockServer(IClassFactory *iface, BOOL dolock)
static HRESULT WINAPI DSCF_LockServer(IClassFactory *iface, BOOL lock)
{
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
FIXME("(%p)->(%d),stub!\n",This,dolock);
if(dolock)
InterlockedIncrement(&object_locks);
else
InterlockedDecrement(&object_locks);
FIXME("iface %p, lock %d, stub!\n", iface, lock);
return S_OK;
}
@ -199,17 +190,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
return QUARTZ_DllGetClassObject( rclsid, riid, ppv );
}
/***********************************************************************
* DllCanUnloadNow (QUARTZ.@)
*/
HRESULT WINAPI DllCanUnloadNow(void)
{
if (!object_locks && QUARTZ_DllCanUnloadNow() == S_OK)
return S_OK;
return S_FALSE;
}
#define OUR_GUID_ENTRY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
{ { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } , #name },

View File

@ -911,8 +911,6 @@ static void StdMemAllocator_Destroy(IMemAllocator *iface)
DeleteCriticalSection(&This->csState);
CoTaskMemFree(This);
InterlockedDecrement(&object_locks);
}
HRESULT mem_allocator_create(IUnknown *lpUnkOuter, IUnknown **out)

View File

@ -80,8 +80,6 @@ static ULONG WINAPI seeking_passthrough_Release(IUnknown *iface)
{
strmbase_passthrough_cleanup(&passthrough->passthrough);
free(passthrough);
InterlockedDecrement(&object_locks);
}
return refcount;
}

View File

@ -58,8 +58,6 @@ static inline const char *debugstr_time(REFERENCE_TIME time)
return wine_dbg_sprintf("%s", rev);
}
extern LONG object_locks;
/* see IAsyncReader::Request on MSDN for the explanation of this */
#define MEDIATIME_FROM_BYTES(x) ((LONGLONG)(x) * 10000000)
#define BYTES_FROM_MEDIATIME(time) ((time) / 10000000)

View File

@ -115,8 +115,6 @@ static ULONG WINAPI system_clock_inner_Release(IUnknown *iface)
clock->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&clock->cs);
heap_free(clock);
InterlockedDecrement(&object_locks);
}
return refcount;
}

View File

@ -130,8 +130,6 @@ static void video_renderer_destroy(struct strmbase_renderer *iface)
video_window_cleanup(&filter->window);
strmbase_renderer_cleanup(&filter->renderer);
free(filter);
InterlockedDecrement(&object_locks);
}
static HRESULT video_renderer_query_interface(struct strmbase_renderer *iface, REFIID iid, void **out)

View File

@ -528,12 +528,6 @@ static void vmr_disconnect(struct strmbase_renderer *This)
}
}
static void vmr_free(struct quartz_vmr *filter)
{
free(filter);
InterlockedDecrement(&object_locks);
}
static void vmr_destroy(struct strmbase_renderer *iface)
{
struct quartz_vmr *filter = impl_from_IBaseFilter(&iface->filter.IBaseFilter_iface);
@ -563,7 +557,7 @@ static void vmr_destroy(struct strmbase_renderer *iface)
FreeLibrary(filter->hD3d9);
strmbase_renderer_cleanup(&filter->renderer);
if (!filter->IVMRSurfaceAllocatorNotify9_refcount)
vmr_free(filter);
free(filter);
}
static HRESULT vmr_query_interface(struct strmbase_renderer *iface, REFIID iid, void **out)
@ -1955,7 +1949,7 @@ static ULONG WINAPI VMR9SurfaceAllocatorNotify_Release(IVMRSurfaceAllocatorNotif
TRACE("%p decreasing refcount to %u.\n", iface, refcount);
if (!refcount && !filter->renderer.filter.refcount)
vmr_free(filter);
free(filter);
return refcount;
}