Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/devenum/createdevenum.c | 4 ---- dlls/devenum/devenum_main.c | 17 +---------------- dlls/devenum/devenum_private.h | 7 ------- dlls/devenum/mediacatenum.c | 10 ---------- dlls/devenum/parsedisplayname.c | 4 ---- 5 files changed, 1 insertion(+), 41 deletions(-)
diff --git a/dlls/devenum/createdevenum.c b/dlls/devenum/createdevenum.c index 8e9cf56eb09..bec462e0f5a 100644 --- a/dlls/devenum/createdevenum.c +++ b/dlls/devenum/createdevenum.c @@ -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 */ }
diff --git a/dlls/devenum/devenum_main.c b/dlls/devenum/devenum_main.c index cbeacbb5b27..87939749121 100644 --- a/dlls/devenum/devenum_main.c +++ b/dlls/devenum/devenum_main.c @@ -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.@) */ diff --git a/dlls/devenum/devenum_private.h b/dlls/devenum/devenum_private.h index 15c41afd570..adc9b377d09 100644 --- a/dlls/devenum/devenum_private.h +++ b/dlls/devenum/devenum_private.h @@ -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, diff --git a/dlls/devenum/mediacatenum.c b/dlls/devenum/mediacatenum.c index b24e24f7f31..9d8069a3aa2 100644 --- a/dlls/devenum/mediacatenum.c +++ b/dlls/devenum/mediacatenum.c @@ -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; } diff --git a/dlls/devenum/parsedisplayname.c b/dlls/devenum/parsedisplayname.c index f24b4329c80..477f2f3d11e 100644 --- a/dlls/devenum/parsedisplayname.c +++ b/dlls/devenum/parsedisplayname.c @@ -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 */ }