devenum: 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
d90ab0805f
commit
65e6165ce8
|
@ -64,8 +64,6 @@ static ULONG WINAPI devenum_factory_AddRef(ICreateDevEnum *iface)
|
|||
{
|
||||
TRACE("\n");
|
||||
|
||||
DEVENUM_LockModule();
|
||||
|
||||
return 2; /* non-heap based object */
|
||||
}
|
||||
|
||||
|
@ -73,8 +71,6 @@ static ULONG WINAPI devenum_factory_Release(ICreateDevEnum *iface)
|
|||
{
|
||||
TRACE("\n");
|
||||
|
||||
DEVENUM_UnlockModule();
|
||||
|
||||
return 1; /* non-heap based object */
|
||||
}
|
||||
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(devenum);
|
||||
|
||||
DECLSPEC_HIDDEN LONG dll_refs;
|
||||
|
||||
struct class_factory
|
||||
{
|
||||
IClassFactory IClassFactory_iface;
|
||||
|
@ -56,13 +54,11 @@ static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID i
|
|||
|
||||
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
|
||||
{
|
||||
DEVENUM_LockModule();
|
||||
return 2;
|
||||
}
|
||||
|
||||
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
|
||||
{
|
||||
DEVENUM_UnlockModule();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -82,10 +78,7 @@ static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface,
|
|||
|
||||
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL lock)
|
||||
{
|
||||
if (lock)
|
||||
DEVENUM_LockModule();
|
||||
else
|
||||
DEVENUM_UnlockModule();
|
||||
TRACE("iface %p, lock %d.\n", iface, lock);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -118,14 +111,6 @@ HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, void **obj)
|
|||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllCanUnloadNow (DEVENUM.@)
|
||||
*/
|
||||
HRESULT WINAPI DllCanUnloadNow(void)
|
||||
{
|
||||
return dll_refs != 0 ? S_FALSE : S_OK;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* DllRegisterServer (DEVENUM.@)
|
||||
*/
|
||||
|
|
|
@ -27,13 +27,6 @@
|
|||
#include "dmo.h"
|
||||
#include "dmodshow.h"
|
||||
|
||||
/**********************************************************************
|
||||
* Dll lifetime tracking declaration for devenum.dll
|
||||
*/
|
||||
extern LONG dll_refs DECLSPEC_HIDDEN;
|
||||
static inline void DEVENUM_LockModule(void) { InterlockedIncrement(&dll_refs); }
|
||||
static inline void DEVENUM_UnlockModule(void) { InterlockedDecrement(&dll_refs); }
|
||||
|
||||
enum device_type
|
||||
{
|
||||
DEVICE_FILTER,
|
||||
|
|
|
@ -414,7 +414,6 @@ static ULONG WINAPI moniker_Release(IMoniker *iface)
|
|||
if (ref == 0) {
|
||||
free(This->name);
|
||||
free(This);
|
||||
DEVENUM_UnlockModule();
|
||||
}
|
||||
return ref;
|
||||
}
|
||||
|
@ -783,8 +782,6 @@ struct moniker *filter_moniker_create(const GUID *class, const WCHAR *name)
|
|||
object->has_class = !!class;
|
||||
object->name = wcsdup(name);
|
||||
|
||||
DEVENUM_LockModule();
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
|
@ -804,8 +801,6 @@ struct moniker *codec_moniker_create(const GUID *class, const WCHAR *name)
|
|||
object->has_class = !!class;
|
||||
object->name = wcsdup(name);
|
||||
|
||||
DEVENUM_LockModule();
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
|
@ -823,8 +818,6 @@ struct moniker *dmo_moniker_create(const GUID class, const GUID clsid)
|
|||
object->class = class;
|
||||
object->clsid = clsid;
|
||||
|
||||
DEVENUM_LockModule();
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
|
@ -879,7 +872,6 @@ static ULONG WINAPI enum_moniker_Release(IEnumMoniker *iface)
|
|||
RegCloseKey(This->sw_key);
|
||||
RegCloseKey(This->cm_key);
|
||||
free(This);
|
||||
DEVENUM_UnlockModule();
|
||||
return 0;
|
||||
}
|
||||
return ref;
|
||||
|
@ -1070,7 +1062,5 @@ HRESULT enum_moniker_create(REFCLSID class, IEnumMoniker **out)
|
|||
|
||||
*out = &object->IEnumMoniker_iface;
|
||||
|
||||
DEVENUM_LockModule();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -51,8 +51,6 @@ static ULONG WINAPI devenum_parser_AddRef(IParseDisplayName *iface)
|
|||
{
|
||||
TRACE("\n");
|
||||
|
||||
DEVENUM_LockModule();
|
||||
|
||||
return 2; /* non-heap based object */
|
||||
}
|
||||
|
||||
|
@ -60,8 +58,6 @@ static ULONG WINAPI devenum_parser_Release(IParseDisplayName *iface)
|
|||
{
|
||||
TRACE("\n");
|
||||
|
||||
DEVENUM_UnlockModule();
|
||||
|
||||
return 1; /* non-heap based object */
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue