Commit 65f25a15 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dswave: Always return S_FALSE from DllCanUnloadNow.

parent 649de392
......@@ -86,7 +86,6 @@ static ULONG WINAPI IUnknownImpl_Release(IUnknown *iface)
if (!ref) {
HeapFree(GetProcessHeap(), 0, This);
DSWAVE_UnlockModule();
}
return ref;
......@@ -191,7 +190,6 @@ HRESULT create_dswave(REFIID lpcGUID, void **ppobj)
obj->dmobj.IDirectMusicObject_iface.lpVtbl = &dmobject_vtbl;
obj->dmobj.IPersistStream_iface.lpVtbl = &persiststream_vtbl;
DSWAVE_LockModule();
hr = IUnknown_QueryInterface(&obj->IUnknown_iface, lpcGUID, ppobj);
IUnknown_Release(&obj->IUnknown_iface);
return hr;
......
......@@ -39,8 +39,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(dswave);
LONG DSWAVE_refCount = 0;
typedef struct {
IClassFactory IClassFactory_iface;
} IClassFactoryImpl;
......@@ -70,15 +68,11 @@ static HRESULT WINAPI WaveCF_QueryInterface(IClassFactory * iface, REFIID riid,
static ULONG WINAPI WaveCF_AddRef(IClassFactory * iface)
{
DSWAVE_LockModule();
return 2; /* non-heap based object */
}
static ULONG WINAPI WaveCF_Release(IClassFactory * iface)
{
DSWAVE_UnlockModule();
return 1; /* non-heap based object */
}
......@@ -98,12 +92,6 @@ static HRESULT WINAPI WaveCF_CreateInstance(IClassFactory * iface, IUnknown *out
static HRESULT WINAPI WaveCF_LockServer(IClassFactory * iface, BOOL dolock)
{
TRACE("(%d)\n", dolock);
if (dolock)
DSWAVE_LockModule();
else
DSWAVE_UnlockModule();
return S_OK;
}
......@@ -118,17 +106,6 @@ static const IClassFactoryVtbl WaveCF_Vtbl = {
static IClassFactoryImpl Wave_CF = {{&WaveCF_Vtbl}};
/******************************************************************
* DllCanUnloadNow (DSWAVE.@)
*
*
*/
HRESULT WINAPI DllCanUnloadNow(void)
{
return DSWAVE_refCount != 0 ? S_FALSE : S_OK;
}
/******************************************************************
* DllGetClassObject (DSWAVE.@)
*
*
......
......@@ -44,11 +44,4 @@
*/
extern HRESULT create_dswave(REFIID lpcGUID, void **ret_iface);
/**********************************************************************
* Dll lifetime tracking declaration for dswave.dll
*/
extern LONG DSWAVE_refCount;
static inline void DSWAVE_LockModule(void) { InterlockedIncrement( &DSWAVE_refCount ); }
static inline void DSWAVE_UnlockModule(void) { InterlockedDecrement( &DSWAVE_refCount ); }
#endif /* __WINE_DSWAVE_PRIVATE_H */
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