Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1727eb48
Commit
1727eb48
authored
Feb 02, 2005
by
James Hawkins
Committed by
Alexandre Julliard
Feb 02, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly implement DllCanUnloadNow ref counting.
parent
3b38dc68
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
102 additions
and
0 deletions
+102
-0
audiopath.c
dlls/dmime/audiopath.c
+6
-0
dmime_main.c
dlls/dmime/dmime_main.c
+0
-0
dmime_private.h
dlls/dmime/dmime_private.h
+6
-0
graph.c
dlls/dmime/graph.c
+6
-0
lyricstrack.c
dlls/dmime/lyricstrack.c
+6
-0
markertrack.c
dlls/dmime/markertrack.c
+6
-0
paramcontroltrack.c
dlls/dmime/paramcontroltrack.c
+6
-0
patterntrack.c
dlls/dmime/patterntrack.c
+6
-0
performance.c
dlls/dmime/performance.c
+6
-0
segment.c
dlls/dmime/segment.c
+6
-0
segmentstate.c
dlls/dmime/segmentstate.c
+6
-0
segtriggertrack.c
dlls/dmime/segtriggertrack.c
+6
-0
seqtrack.c
dlls/dmime/seqtrack.c
+6
-0
sysextrack.c
dlls/dmime/sysextrack.c
+6
-0
tempotrack.c
dlls/dmime/tempotrack.c
+6
-0
timesigtrack.c
dlls/dmime/timesigtrack.c
+6
-0
tool.c
dlls/dmime/tool.c
+6
-0
wavetrack.c
dlls/dmime/wavetrack.c
+6
-0
No files found.
dlls/dmime/audiopath.c
View file @
1727eb48
...
...
@@ -58,6 +58,8 @@ ULONG WINAPI IDirectMusicAudioPathImpl_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMIME_LockModule
();
return
ref
;
}
...
...
@@ -65,12 +67,16 @@ ULONG WINAPI IDirectMusicAudioPathImpl_IUnknown_Release (LPUNKNOWN iface) {
ICOM_THIS_MULTI
(
IDirectMusicAudioPathImpl
,
UnknownVtbl
,
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
if
(
This
->
pDSBuffer
)
{
IDirectSoundBuffer8_Release
(
This
->
pDSBuffer
);
}
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMIME_UnlockModule
();
return
ref
;
}
...
...
dlls/dmime/dmime_main.c
View file @
1727eb48
This diff is collapsed.
Click to expand it.
dlls/dmime/dmime_private.h
View file @
1727eb48
...
...
@@ -949,6 +949,12 @@ extern HRESULT WINAPI IDirectMusicWaveTrack_IPersistStream_Load (LPPERSISTSTREAM
extern
HRESULT
WINAPI
IDirectMusicWaveTrack_IPersistStream_Save
(
LPPERSISTSTREAM
iface
,
IStream
*
pStm
,
BOOL
fClearDirty
);
extern
HRESULT
WINAPI
IDirectMusicWaveTrack_IPersistStream_GetSizeMax
(
LPPERSISTSTREAM
iface
,
ULARGE_INTEGER
*
pcbSize
);
/**********************************************************************
* Dll lifetime tracking declaration for dmime.dll
*/
extern
LONG
DMIME_refCount
;
static
inline
void
DMIME_LockModule
()
{
InterlockedIncrement
(
&
DMIME_refCount
);
}
static
inline
void
DMIME_UnlockModule
()
{
InterlockedDecrement
(
&
DMIME_refCount
);
}
/*****************************************************************************
* Misc.
...
...
dlls/dmime/graph.c
View file @
1727eb48
...
...
@@ -58,6 +58,8 @@ ULONG WINAPI IDirectMusicGraphImpl_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMIME_LockModule
();
return
ref
;
}
...
...
@@ -65,9 +67,13 @@ ULONG WINAPI IDirectMusicGraphImpl_IUnknown_Release (LPUNKNOWN iface) {
ICOM_THIS_MULTI
(
IDirectMusicGraphImpl
,
UnknownVtbl
,
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMIME_UnlockModule
();
return
ref
;
}
...
...
dlls/dmime/lyricstrack.c
View file @
1727eb48
...
...
@@ -55,6 +55,8 @@ ULONG WINAPI IDirectMusicLyricsTrack_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMIME_LockModule
();
return
ref
;
}
...
...
@@ -62,9 +64,13 @@ ULONG WINAPI IDirectMusicLyricsTrack_IUnknown_Release (LPUNKNOWN iface) {
ICOM_THIS_MULTI
(
IDirectMusicLyricsTrack
,
UnknownVtbl
,
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMIME_UnlockModule
();
return
ref
;
}
...
...
dlls/dmime/markertrack.c
View file @
1727eb48
...
...
@@ -55,6 +55,8 @@ ULONG WINAPI IDirectMusicMarkerTrack_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMIME_LockModule
();
return
ref
;
}
...
...
@@ -62,9 +64,13 @@ ULONG WINAPI IDirectMusicMarkerTrack_IUnknown_Release (LPUNKNOWN iface) {
ICOM_THIS_MULTI
(
IDirectMusicMarkerTrack
,
UnknownVtbl
,
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMIME_UnlockModule
();
return
ref
;
}
...
...
dlls/dmime/paramcontroltrack.c
View file @
1727eb48
...
...
@@ -55,6 +55,8 @@ ULONG WINAPI IDirectMusicParamControlTrack_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMIME_LockModule
();
return
ref
;
}
...
...
@@ -62,9 +64,13 @@ ULONG WINAPI IDirectMusicParamControlTrack_IUnknown_Release (LPUNKNOWN iface) {
ICOM_THIS_MULTI
(
IDirectMusicParamControlTrack
,
UnknownVtbl
,
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMIME_UnlockModule
();
return
ref
;
}
...
...
dlls/dmime/patterntrack.c
View file @
1727eb48
...
...
@@ -43,6 +43,8 @@ ULONG WINAPI IDirectMusicPatternTrackImpl_AddRef (LPDIRECTMUSICPATTERNTRACK ifac
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMIME_LockModule
();
return
ref
;
}
...
...
@@ -50,9 +52,13 @@ ULONG WINAPI IDirectMusicPatternTrackImpl_Release (LPDIRECTMUSICPATTERNTRACK ifa
IDirectMusicPatternTrackImpl
*
This
=
(
IDirectMusicPatternTrackImpl
*
)
iface
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMIME_UnlockModule
();
return
ref
;
}
...
...
dlls/dmime/performance.c
View file @
1727eb48
...
...
@@ -186,6 +186,8 @@ ULONG WINAPI IDirectMusicPerformance8Impl_AddRef (LPDIRECTMUSICPERFORMANCE8 ifac
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMIME_LockModule
();
return
ref
;
}
...
...
@@ -193,10 +195,14 @@ ULONG WINAPI IDirectMusicPerformance8Impl_Release (LPDIRECTMUSICPERFORMANCE8 ifa
IDirectMusicPerformance8Impl
*
This
=
(
IDirectMusicPerformance8Impl
*
)
iface
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
DeleteCriticalSection
(
&
This
->
safe
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMIME_UnlockModule
();
return
ref
;
}
...
...
dlls/dmime/segment.c
View file @
1727eb48
...
...
@@ -61,6 +61,8 @@ ULONG WINAPI IDirectMusicSegment8Impl_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMIME_LockModule
();
return
ref
;
}
...
...
@@ -68,9 +70,13 @@ ULONG WINAPI IDirectMusicSegment8Impl_IUnknown_Release (LPUNKNOWN iface) {
ICOM_THIS_MULTI
(
IDirectMusicSegment8Impl
,
UnknownVtbl
,
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMIME_UnlockModule
();
return
ref
;
}
...
...
dlls/dmime/segmentstate.c
View file @
1727eb48
...
...
@@ -43,6 +43,8 @@ ULONG WINAPI IDirectMusicSegmentState8Impl_AddRef (LPDIRECTMUSICSEGMENTSTATE8 if
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMIME_LockModule
();
return
ref
;
}
...
...
@@ -50,9 +52,13 @@ ULONG WINAPI IDirectMusicSegmentState8Impl_Release (LPDIRECTMUSICSEGMENTSTATE8 i
IDirectMusicSegmentState8Impl
*
This
=
(
IDirectMusicSegmentState8Impl
*
)
iface
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMIME_UnlockModule
();
return
ref
;
}
...
...
dlls/dmime/segtriggertrack.c
View file @
1727eb48
...
...
@@ -56,6 +56,8 @@ ULONG WINAPI IDirectMusicSegTriggerTrack_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMIME_LockModule
();
return
ref
;
}
...
...
@@ -63,9 +65,13 @@ ULONG WINAPI IDirectMusicSegTriggerTrack_IUnknown_Release (LPUNKNOWN iface) {
ICOM_THIS_MULTI
(
IDirectMusicSegTriggerTrack
,
UnknownVtbl
,
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMIME_UnlockModule
();
return
ref
;
}
...
...
dlls/dmime/seqtrack.c
View file @
1727eb48
...
...
@@ -55,6 +55,8 @@ ULONG WINAPI IDirectMusicSeqTrack_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMIME_LockModule
();
return
ref
;
}
...
...
@@ -62,9 +64,13 @@ ULONG WINAPI IDirectMusicSeqTrack_IUnknown_Release (LPUNKNOWN iface) {
ICOM_THIS_MULTI
(
IDirectMusicSeqTrack
,
UnknownVtbl
,
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMIME_UnlockModule
();
return
ref
;
}
...
...
dlls/dmime/sysextrack.c
View file @
1727eb48
...
...
@@ -55,6 +55,8 @@ ULONG WINAPI IDirectMusicSysExTrack_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMIME_LockModule
();
return
ref
;
}
...
...
@@ -62,9 +64,13 @@ ULONG WINAPI IDirectMusicSysExTrack_IUnknown_Release (LPUNKNOWN iface) {
ICOM_THIS_MULTI
(
IDirectMusicSysExTrack
,
UnknownVtbl
,
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMIME_UnlockModule
();
return
ref
;
}
...
...
dlls/dmime/tempotrack.c
View file @
1727eb48
...
...
@@ -56,6 +56,8 @@ ULONG WINAPI IDirectMusicTempoTrack_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMIME_LockModule
();
return
ref
;
}
...
...
@@ -63,9 +65,13 @@ ULONG WINAPI IDirectMusicTempoTrack_IUnknown_Release (LPUNKNOWN iface) {
ICOM_THIS_MULTI
(
IDirectMusicTempoTrack
,
UnknownVtbl
,
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMIME_UnlockModule
();
return
ref
;
}
...
...
dlls/dmime/timesigtrack.c
View file @
1727eb48
...
...
@@ -55,6 +55,8 @@ ULONG WINAPI IDirectMusicTimeSigTrack_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMIME_LockModule
();
return
ref
;
}
...
...
@@ -62,9 +64,13 @@ ULONG WINAPI IDirectMusicTimeSigTrack_IUnknown_Release (LPUNKNOWN iface) {
ICOM_THIS_MULTI
(
IDirectMusicTimeSigTrack
,
UnknownVtbl
,
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMIME_UnlockModule
();
return
ref
;
}
...
...
dlls/dmime/tool.c
View file @
1727eb48
...
...
@@ -42,6 +42,8 @@ ULONG WINAPI IDirectMusicTool8Impl_AddRef (LPDIRECTMUSICTOOL8 iface) {
TRACE
(
"(%p) : AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMIME_LockModule
();
return
ref
;
}
...
...
@@ -49,9 +51,13 @@ ULONG WINAPI IDirectMusicTool8Impl_Release (LPDIRECTMUSICTOOL8 iface) {
IDirectMusicTool8Impl
*
This
=
(
IDirectMusicTool8Impl
*
)
iface
;
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) : ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMIME_UnlockModule
();
return
ref
;
}
...
...
dlls/dmime/wavetrack.c
View file @
1727eb48
...
...
@@ -55,6 +55,8 @@ ULONG WINAPI IDirectMusicWaveTrack_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p) : AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMIME_LockModule
();
return
ref
;
}
...
...
@@ -62,9 +64,13 @@ ULONG WINAPI IDirectMusicWaveTrack_IUnknown_Release (LPUNKNOWN iface) {
ICOM_THIS_MULTI
(
IDirectMusicWaveTrack
,
UnknownVtbl
,
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) : ReleaseRef to %ld
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMIME_UnlockModule
();
return
ref
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment