mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 17:44:10 +00:00
dmime: Always return S_FALSE from DllCanUnloadNow.
This commit is contained in:
parent
4ae866a0a7
commit
6e1e7a88fd
|
@ -96,7 +96,6 @@ static ULONG WINAPI IDirectMusicAudioPathImpl_AddRef (IDirectMusicAudioPath *ifa
|
|||
|
||||
TRACE("(%p): ref=%ld\n", This, ref);
|
||||
|
||||
DMIME_LockModule();
|
||||
return ref;
|
||||
}
|
||||
|
||||
|
@ -116,7 +115,6 @@ static ULONG WINAPI IDirectMusicAudioPathImpl_Release (IDirectMusicAudioPath *if
|
|||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
|
||||
DMIME_UnlockModule();
|
||||
return ref;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,8 +38,6 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(dmime);
|
||||
|
||||
LONG DMIME_refCount = 0;
|
||||
|
||||
typedef struct {
|
||||
IClassFactory IClassFactory_iface;
|
||||
HRESULT (*fnCreateInstance)(REFIID riid, void **ret_iface);
|
||||
|
@ -75,15 +73,11 @@ static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID r
|
|||
|
||||
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
|
||||
{
|
||||
DMIME_LockModule();
|
||||
|
||||
return 2; /* non-heap based object */
|
||||
}
|
||||
|
||||
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
|
||||
{
|
||||
DMIME_UnlockModule();
|
||||
|
||||
return 1; /* non-heap based object */
|
||||
}
|
||||
|
||||
|
@ -103,12 +97,6 @@ static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown
|
|||
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock)
|
||||
{
|
||||
TRACE("(%d)\n", dolock);
|
||||
|
||||
if (dolock)
|
||||
DMIME_LockModule();
|
||||
else
|
||||
DMIME_UnlockModule();
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
@ -136,16 +124,6 @@ static IClassFactoryImpl SegTriggerTrack_CF = {{&classfactory_vtbl}, create_dmse
|
|||
static IClassFactoryImpl AudioPath_CF = {{&classfactory_vtbl}, create_dmaudiopath};
|
||||
static IClassFactoryImpl WaveTrack_CF = {{&classfactory_vtbl}, create_dmwavetrack};
|
||||
|
||||
/******************************************************************
|
||||
* DllCanUnloadNow (DMIME.1)
|
||||
*
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI DllCanUnloadNow(void)
|
||||
{
|
||||
return DMIME_refCount != 0 ? S_FALSE : S_OK;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************
|
||||
* DllGetClassObject (DMIME.@)
|
||||
|
|
|
@ -96,13 +96,6 @@ typedef struct _DMUS_PRIVATE_TEMPO_PLAY_STATE {
|
|||
DWORD dummy;
|
||||
} DMUS_PRIVATE_TEMPO_PLAY_STATE, *LPDMUS_PRIVATE_TEMPO_PLAY_STATE;
|
||||
|
||||
/**********************************************************************
|
||||
* Dll lifetime tracking declaration for dmime.dll
|
||||
*/
|
||||
extern LONG DMIME_refCount;
|
||||
static inline void DMIME_LockModule(void) { InterlockedIncrement( &DMIME_refCount ); }
|
||||
static inline void DMIME_UnlockModule(void) { InterlockedDecrement( &DMIME_refCount ); }
|
||||
|
||||
/*****************************************************************************
|
||||
* Misc.
|
||||
*/
|
||||
|
|
|
@ -75,7 +75,6 @@ static ULONG WINAPI DirectMusicGraph_AddRef(IDirectMusicGraph *iface)
|
|||
|
||||
TRACE("(%p): %ld\n", This, ref);
|
||||
|
||||
DMIME_LockModule();
|
||||
return ref;
|
||||
}
|
||||
|
||||
|
@ -89,7 +88,6 @@ static ULONG WINAPI DirectMusicGraph_Release(IDirectMusicGraph *iface)
|
|||
if (ref == 0)
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
|
||||
DMIME_UnlockModule();
|
||||
return ref;
|
||||
}
|
||||
|
||||
|
|
|
@ -84,7 +84,6 @@ static ULONG WINAPI lyrics_track_Release(IDirectMusicTrack8 *iface)
|
|||
|
||||
if (!ref) {
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
DMIME_UnlockModule();
|
||||
}
|
||||
|
||||
return ref;
|
||||
|
@ -359,7 +358,6 @@ HRESULT create_dmlyricstrack(REFIID lpcGUID, void **ppobj)
|
|||
(IUnknown *)&track->IDirectMusicTrack8_iface);
|
||||
track->dmobj.IPersistStream_iface.lpVtbl = &persiststream_vtbl;
|
||||
|
||||
DMIME_LockModule();
|
||||
hr = IDirectMusicTrack8_QueryInterface(&track->IDirectMusicTrack8_iface, lpcGUID, ppobj);
|
||||
IDirectMusicTrack8_Release(&track->IDirectMusicTrack8_iface);
|
||||
|
||||
|
|
|
@ -78,7 +78,6 @@ static ULONG WINAPI IDirectMusicTrackImpl_Release(IDirectMusicTrack *iface)
|
|||
|
||||
if (!ref) {
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
DMIME_UnlockModule();
|
||||
}
|
||||
|
||||
return ref;
|
||||
|
@ -237,7 +236,6 @@ HRESULT create_dmmarkertrack(REFIID lpcGUID, void **ppobj)
|
|||
(IUnknown *)&track->IDirectMusicTrack_iface);
|
||||
track->dmobj.IPersistStream_iface.lpVtbl = &persiststream_vtbl;
|
||||
|
||||
DMIME_LockModule();
|
||||
hr = IDirectMusicTrack_QueryInterface(&track->IDirectMusicTrack_iface, lpcGUID, ppobj);
|
||||
IDirectMusicTrack_Release(&track->IDirectMusicTrack_iface);
|
||||
|
||||
|
|
|
@ -79,7 +79,6 @@ static ULONG WINAPI paramcontrol_track_Release(IDirectMusicTrack8 *iface)
|
|||
|
||||
if (!ref) {
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
DMIME_UnlockModule();
|
||||
}
|
||||
|
||||
return ref;
|
||||
|
@ -273,7 +272,6 @@ HRESULT create_dmparamcontroltrack(REFIID lpcGUID, void **ppobj)
|
|||
(IUnknown *)&track->IDirectMusicTrack8_iface);
|
||||
track->dmobj.IPersistStream_iface.lpVtbl = &persiststream_vtbl;
|
||||
|
||||
DMIME_LockModule();
|
||||
hr = IDirectMusicTrack8_QueryInterface(&track->IDirectMusicTrack8_iface, lpcGUID, ppobj);
|
||||
IDirectMusicTrack8_Release(&track->IDirectMusicTrack8_iface);
|
||||
|
||||
|
|
|
@ -278,8 +278,6 @@ static ULONG WINAPI IDirectMusicPerformance8Impl_AddRef(IDirectMusicPerformance8
|
|||
|
||||
TRACE("(%p): ref=%ld\n", This, ref);
|
||||
|
||||
DMIME_LockModule();
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
|
@ -297,8 +295,6 @@ static ULONG WINAPI IDirectMusicPerformance8Impl_Release(IDirectMusicPerformance
|
|||
HeapFree(GetProcessHeap(), 0, This);
|
||||
}
|
||||
|
||||
DMIME_UnlockModule();
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,6 @@ static ULONG WINAPI IDirectMusicSegment8Impl_Release(IDirectMusicSegment8 *iface
|
|||
free(This->wave_data);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
DMIME_UnlockModule();
|
||||
}
|
||||
|
||||
return ref;
|
||||
|
@ -935,8 +934,6 @@ IDirectMusicSegment8Impl *create_segment(void)
|
|||
obj->dmobj.IPersistStream_iface.lpVtbl = &persiststream_vtbl;
|
||||
list_init (&obj->Tracks);
|
||||
|
||||
DMIME_LockModule();
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
|
|
@ -63,8 +63,6 @@ static ULONG WINAPI DirectMusicSegmentState8_AddRef(IDirectMusicSegmentState8 *i
|
|||
|
||||
TRACE("(%p): %ld\n", This, ref);
|
||||
|
||||
DMIME_LockModule();
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
|
@ -78,8 +76,6 @@ static ULONG WINAPI DirectMusicSegmentState8_Release(IDirectMusicSegmentState8 *
|
|||
if (ref == 0)
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
|
||||
DMIME_UnlockModule();
|
||||
|
||||
return ref;
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,6 @@ static ULONG WINAPI segment_track_Release(IDirectMusicTrack8 *iface)
|
|||
}
|
||||
|
||||
heap_free(This);
|
||||
DMIME_UnlockModule();
|
||||
}
|
||||
|
||||
return ref;
|
||||
|
@ -399,7 +398,6 @@ HRESULT create_dmsegtriggertrack(REFIID lpcGUID, void **ppobj)
|
|||
track->dmobj.IPersistStream_iface.lpVtbl = &persiststream_vtbl;
|
||||
list_init(&track->Items);
|
||||
|
||||
DMIME_LockModule();
|
||||
hr = IDirectMusicTrack8_QueryInterface(&track->IDirectMusicTrack8_iface, lpcGUID, ppobj);
|
||||
IDirectMusicTrack8_Release(&track->IDirectMusicTrack8_iface);
|
||||
|
||||
|
|
|
@ -79,7 +79,6 @@ static ULONG WINAPI sequence_track_Release(IDirectMusicTrack8 *iface)
|
|||
|
||||
if (!ref) {
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
DMIME_UnlockModule();
|
||||
}
|
||||
|
||||
return ref;
|
||||
|
@ -273,7 +272,6 @@ HRESULT create_dmseqtrack(REFIID lpcGUID, void **ppobj)
|
|||
(IUnknown *)&track->IDirectMusicTrack8_iface);
|
||||
track->dmobj.IPersistStream_iface.lpVtbl = &persiststream_vtbl;
|
||||
|
||||
DMIME_LockModule();
|
||||
hr = IDirectMusicTrack8_QueryInterface(&track->IDirectMusicTrack8_iface, lpcGUID, ppobj);
|
||||
IDirectMusicTrack8_Release(&track->IDirectMusicTrack8_iface);
|
||||
|
||||
|
|
|
@ -79,7 +79,6 @@ static ULONG WINAPI sysex_track_Release(IDirectMusicTrack8 *iface)
|
|||
|
||||
if (!ref) {
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
DMIME_UnlockModule();
|
||||
}
|
||||
|
||||
return ref;
|
||||
|
@ -272,7 +271,6 @@ HRESULT create_dmsysextrack(REFIID lpcGUID, void **ppobj)
|
|||
(IUnknown *)&track->IDirectMusicTrack8_iface);
|
||||
track->dmobj.IPersistStream_iface.lpVtbl = &persiststream_vtbl;
|
||||
|
||||
DMIME_LockModule();
|
||||
hr = IDirectMusicTrack8_QueryInterface(&track->IDirectMusicTrack8_iface, lpcGUID, ppobj);
|
||||
IDirectMusicTrack8_Release(&track->IDirectMusicTrack8_iface);
|
||||
|
||||
|
|
|
@ -87,7 +87,6 @@ static ULONG WINAPI tempo_track_Release(IDirectMusicTrack8 *iface)
|
|||
if (!ref) {
|
||||
heap_free(This->items);
|
||||
heap_free(This);
|
||||
DMIME_UnlockModule();
|
||||
}
|
||||
|
||||
return ref;
|
||||
|
@ -386,7 +385,6 @@ HRESULT create_dmtempotrack(REFIID lpcGUID, void **ppobj)
|
|||
(IUnknown *)&track->IDirectMusicTrack8_iface);
|
||||
track->dmobj.IPersistStream_iface.lpVtbl = &persiststream_vtbl;
|
||||
|
||||
DMIME_LockModule();
|
||||
hr = IDirectMusicTrack8_QueryInterface(&track->IDirectMusicTrack8_iface, lpcGUID, ppobj);
|
||||
IDirectMusicTrack8_Release(&track->IDirectMusicTrack8_iface);
|
||||
|
||||
|
|
|
@ -88,7 +88,6 @@ static ULONG WINAPI IDirectMusicTrackImpl_Release(IDirectMusicTrack *iface)
|
|||
if (!ref) {
|
||||
heap_free(This->items);
|
||||
HeapFree(GetProcessHeap(), 0, This);
|
||||
DMIME_UnlockModule();
|
||||
}
|
||||
|
||||
return ref;
|
||||
|
@ -301,7 +300,6 @@ HRESULT create_dmtimesigtrack(REFIID lpcGUID, void **ppobj)
|
|||
(IUnknown *)&track->IDirectMusicTrack_iface);
|
||||
track->dmobj.IPersistStream_iface.lpVtbl = &persiststream_vtbl;
|
||||
|
||||
DMIME_LockModule();
|
||||
hr = IDirectMusicTrack_QueryInterface(&track->IDirectMusicTrack_iface, lpcGUID, ppobj);
|
||||
IDirectMusicTrack_Release(&track->IDirectMusicTrack_iface);
|
||||
|
||||
|
|
|
@ -113,7 +113,6 @@ static ULONG WINAPI wave_track_Release(IDirectMusicTrack8 *iface)
|
|||
}
|
||||
|
||||
heap_free(This);
|
||||
DMIME_UnlockModule();
|
||||
}
|
||||
|
||||
return ref;
|
||||
|
@ -488,7 +487,6 @@ HRESULT create_dmwavetrack(REFIID lpcGUID, void **ppobj)
|
|||
track->dmobj.IPersistStream_iface.lpVtbl = &persiststream_vtbl;
|
||||
list_init(&track->parts);
|
||||
|
||||
DMIME_LockModule();
|
||||
hr = IDirectMusicTrack8_QueryInterface(&track->IDirectMusicTrack8_iface, lpcGUID, ppobj);
|
||||
IDirectMusicTrack8_Release(&track->IDirectMusicTrack8_iface);
|
||||
|
||||
|
|
Loading…
Reference in a new issue