Commit 65e6165c authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

devenum: Always return S_FALSE from DllCanUnloadNow().

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