Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ba92d292
Commit
ba92d292
authored
Jan 14, 2005
by
James Hawkins
Committed by
Alexandre Julliard
Jan 14, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Use Interlocked* instead of ++/-- in AddRef/Release.
- Use only stored result of Interlocked* in AddRef/Release. - Expand TRACEs to display the ref count.
parent
516a9c70
Hide whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
480 additions
and
315 deletions
+480
-315
dmsynth_main.c
dlls/dmsynth/dmsynth_main.c
+4
-4
synth.c
dlls/dmsynth/synth.c
+11
-6
synthsink.c
dlls/dmsynth/synthsink.c
+11
-6
buffer.c
dlls/dmusic/buffer.c
+11
-6
clock.c
dlls/dmusic/clock.c
+11
-6
collection.c
dlls/dmusic/collection.c
+11
-6
dmusic.c
dlls/dmusic/dmusic.c
+11
-6
dmusic_main.c
dlls/dmusic/dmusic_main.c
+4
-4
download.c
dlls/dmusic/download.c
+11
-6
downloadedinstrument.c
dlls/dmusic/downloadedinstrument.c
+11
-6
instrument.c
dlls/dmusic/instrument.c
+11
-6
port.c
dlls/dmusic/port.c
+11
-6
portdownload.c
dlls/dmusic/portdownload.c
+11
-6
thru.c
dlls/dmusic/thru.c
+11
-6
address.c
dlls/dpnet/address.c
+11
-6
client.c
dlls/dpnet/client.c
+11
-6
dswave.c
dlls/dswave/dswave.c
+11
-6
dswave_main.c
dlls/dswave/dswave_main.c
+2
-2
container.c
dlls/dxdiagn/container.c
+11
-6
provider.c
dlls/dxdiagn/provider.c
+11
-6
dmoreg.c
dlls/msdmo/dmoreg.c
+4
-5
connpt.c
dlls/oleaut32/connpt.c
+19
-23
dispatch.c
dlls/oleaut32/dispatch.c
+8
-7
olepicture.c
dlls/oleaut32/olepicture.c
+9
-10
tmarshal.c
dlls/oleaut32/tmarshal.c
+14
-14
classinfo.c
dlls/shdocvw/classinfo.c
+16
-8
events.c
dlls/shdocvw/events.c
+16
-8
factory.c
dlls/shdocvw/factory.c
+8
-4
misc.c
dlls/shdocvw/misc.c
+8
-4
oleobject.c
dlls/shdocvw/oleobject.c
+24
-12
persist.c
dlls/shdocvw/persist.c
+16
-8
webbrowser.c
dlls/shdocvw/webbrowser.c
+8
-4
autocomplete.c
dlls/shell32/autocomplete.c
+8
-6
cpanelfolder.c
dlls/shell32/cpanelfolder.c
+7
-6
dataobject.c
dlls/shell32/dataobject.c
+20
-11
dragdrophelper.c
dlls/shell32/dragdrophelper.c
+7
-5
enumidlist.c
dlls/shell32/enumidlist.c
+9
-6
folders.c
dlls/shell32/folders.c
+7
-5
memorystream.c
dlls/shell32/memorystream.c
+7
-5
shelllink.c
dlls/shell32/shelllink.c
+7
-5
shellole.c
dlls/shell32/shellole.c
+9
-5
shfldr_desktop.c
dlls/shell32/shfldr_desktop.c
+7
-5
shfldr_fs.c
dlls/shell32/shfldr_fs.c
+7
-6
shfldr_mycomp.c
dlls/shell32/shfldr_mycomp.c
+7
-6
shlfsbind.c
dlls/shell32/shlfsbind.c
+10
-6
shlview.c
dlls/shell32/shlview.c
+7
-6
shv_bg_cmenu.c
dlls/shell32/shv_bg_cmenu.c
+7
-7
shv_item_cmenu.c
dlls/shell32/shv_item_cmenu.c
+7
-6
No files found.
dlls/dmsynth/dmsynth_main.c
View file @
ba92d292
...
...
@@ -40,13 +40,13 @@ static HRESULT WINAPI SynthCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LP
static
ULONG
WINAPI
SynthCF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
return
++
(
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
SynthCF_Release
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
/* static class, won't be freed */
return
--
(
This
->
ref
);
return
InterlockedDecrement
(
&
This
->
ref
);
}
static
HRESULT
WINAPI
SynthCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
...
...
@@ -82,13 +82,13 @@ static HRESULT WINAPI SynthSinkCF_QueryInterface(LPCLASSFACTORY iface,REFIID rii
static
ULONG
WINAPI
SynthSinkCF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
return
++
(
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
SynthSinkCF_Release
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
/* static class, won't be freed */
return
--
(
This
->
ref
);
return
InterlockedDecrement
(
&
This
->
ref
);
}
static
HRESULT
WINAPI
SynthSinkCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
...
...
dlls/dmsynth/synth.c
View file @
ba92d292
...
...
@@ -39,18 +39,23 @@ HRESULT WINAPI IDirectMusicSynth8Impl_QueryInterface (LPDIRECTMUSICSYNTH8 iface,
ULONG
WINAPI
IDirectMusicSynth8Impl_AddRef
(
LPDIRECTMUSICSYNTH8
iface
)
{
IDirectMusicSynth8Impl
*
This
=
(
IDirectMusicSynth8Impl
*
)
iface
;
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
ULONG
WINAPI
IDirectMusicSynth8Impl_Release
(
LPDIRECTMUSICSYNTH8
iface
)
{
IDirectMusicSynth8Impl
*
This
=
(
IDirectMusicSynth8Impl
*
)
iface
;
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
if
(
ref
==
0
)
{
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
Count
;
}
/* IDirectMusicSynth8Impl IDirectMusicSynth part: */
...
...
dlls/dmsynth/synthsink.c
View file @
ba92d292
...
...
@@ -38,18 +38,23 @@ HRESULT WINAPI IDirectMusicSynthSinkImpl_QueryInterface (LPDIRECTMUSICSYNTHSINK
ULONG
WINAPI
IDirectMusicSynthSinkImpl_AddRef
(
LPDIRECTMUSICSYNTHSINK
iface
)
{
IDirectMusicSynthSinkImpl
*
This
=
(
IDirectMusicSynthSinkImpl
*
)
iface
;
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
ULONG
WINAPI
IDirectMusicSynthSinkImpl_Release
(
LPDIRECTMUSICSYNTHSINK
iface
)
{
IDirectMusicSynthSinkImpl
*
This
=
(
IDirectMusicSynthSinkImpl
*
)
iface
;
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
if
(
ref
==
0
)
{
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
Count
;
}
/* IDirectMusicSynthSinkImpl IDirectMusicSynthSink part: */
...
...
dlls/dmusic/buffer.c
View file @
ba92d292
...
...
@@ -37,18 +37,23 @@ HRESULT WINAPI IDirectMusicBufferImpl_QueryInterface (LPDIRECTMUSICBUFFER iface,
ULONG
WINAPI
IDirectMusicBufferImpl_AddRef
(
LPDIRECTMUSICBUFFER
iface
)
{
IDirectMusicBufferImpl
*
This
=
(
IDirectMusicBufferImpl
*
)
iface
;
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
ULONG
WINAPI
IDirectMusicBufferImpl_Release
(
LPDIRECTMUSICBUFFER
iface
)
{
IDirectMusicBufferImpl
*
This
=
(
IDirectMusicBufferImpl
*
)
iface
;
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
if
(
ref
==
0
)
{
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
Count
;
}
/* IDirectMusicBufferImpl IDirectMusicBuffer part: */
...
...
dlls/dmusic/clock.c
View file @
ba92d292
...
...
@@ -38,18 +38,23 @@ HRESULT WINAPI IReferenceClockImpl_QueryInterface (IReferenceClock *iface, REFII
ULONG
WINAPI
IReferenceClockImpl_AddRef
(
IReferenceClock
*
iface
)
{
IReferenceClockImpl
*
This
=
(
IReferenceClockImpl
*
)
iface
;
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
ULONG
WINAPI
IReferenceClockImpl_Release
(
IReferenceClock
*
iface
)
{
IReferenceClockImpl
*
This
=
(
IReferenceClockImpl
*
)
iface
;
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
if
(
ref
==
0
)
{
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
Count
;
}
/* IReferenceClockImpl IReferenceClock part: */
...
...
dlls/dmusic/collection.c
View file @
ba92d292
...
...
@@ -54,18 +54,23 @@ HRESULT WINAPI IDirectMusicCollectionImpl_IUnknown_QueryInterface (LPUNKNOWN ifa
ULONG
WINAPI
IDirectMusicCollectionImpl_IUnknown_AddRef
(
LPUNKNOWN
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicCollectionImpl
,
UnknownVtbl
,
iface
);
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
ULONG
WINAPI
IDirectMusicCollectionImpl_IUnknown_Release
(
LPUNKNOWN
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicCollectionImpl
,
UnknownVtbl
,
iface
);
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
if
(
ref
==
0
)
{
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
Count
;
}
IUnknownVtbl
DirectMusicCollection_Unknown_Vtbl
=
{
...
...
dlls/dmusic/dmusic.c
View file @
ba92d292
...
...
@@ -40,18 +40,23 @@ HRESULT WINAPI IDirectMusic8Impl_QueryInterface (LPDIRECTMUSIC8 iface, REFIID ri
ULONG
WINAPI
IDirectMusic8Impl_AddRef
(
LPDIRECTMUSIC8
iface
)
{
IDirectMusic8Impl
*
This
=
(
IDirectMusic8Impl
*
)
iface
;
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
ULONG
WINAPI
IDirectMusic8Impl_Release
(
LPDIRECTMUSIC8
iface
)
{
IDirectMusic8Impl
*
This
=
(
IDirectMusic8Impl
*
)
iface
;
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
if
(
ref
==
0
)
{
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
Count
;
}
/* IDirectMusic8Impl IDirectMusic part: */
...
...
dlls/dmusic/dmusic_main.c
View file @
ba92d292
...
...
@@ -40,13 +40,13 @@ static HRESULT WINAPI DirectMusicCF_QueryInterface(LPCLASSFACTORY iface,REFIID r
static
ULONG
WINAPI
DirectMusicCF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
return
++
(
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
DirectMusicCF_Release
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
/* static class, won't be freed */
return
--
(
This
->
ref
);
return
InterlockedDecrement
(
&
This
->
ref
);
}
static
HRESULT
WINAPI
DirectMusicCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
...
...
@@ -82,13 +82,13 @@ static HRESULT WINAPI CollectionCF_QueryInterface(LPCLASSFACTORY iface,REFIID ri
static
ULONG
WINAPI
CollectionCF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
return
++
(
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
CollectionCF_Release
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
/* static class, won't be freed */
return
--
(
This
->
ref
);
return
InterlockedDecrement
(
&
This
->
ref
);
}
static
HRESULT
WINAPI
CollectionCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
...
...
dlls/dmusic/download.c
View file @
ba92d292
...
...
@@ -38,18 +38,23 @@ HRESULT WINAPI IDirectMusicDownloadImpl_QueryInterface (LPDIRECTMUSICDOWNLOAD if
ULONG
WINAPI
IDirectMusicDownloadImpl_AddRef
(
LPDIRECTMUSICDOWNLOAD
iface
)
{
IDirectMusicDownloadImpl
*
This
=
(
IDirectMusicDownloadImpl
*
)
iface
;
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
ULONG
WINAPI
IDirectMusicDownloadImpl_Release
(
LPDIRECTMUSICDOWNLOAD
iface
)
{
IDirectMusicDownloadImpl
*
This
=
(
IDirectMusicDownloadImpl
*
)
iface
;
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
if
(
ref
==
0
)
{
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
Count
;
}
/* IDirectMusicDownloadImpl IDirectMusicDownload part: */
...
...
dlls/dmusic/downloadedinstrument.c
View file @
ba92d292
...
...
@@ -38,18 +38,23 @@ HRESULT WINAPI IDirectMusicDownloadedInstrumentImpl_QueryInterface (LPDIRECTMUSI
ULONG
WINAPI
IDirectMusicDownloadedInstrumentImpl_AddRef
(
LPDIRECTMUSICDOWNLOADEDINSTRUMENT
iface
)
{
IDirectMusicDownloadedInstrumentImpl
*
This
=
(
IDirectMusicDownloadedInstrumentImpl
*
)
iface
;
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
ULONG
WINAPI
IDirectMusicDownloadedInstrumentImpl_Release
(
LPDIRECTMUSICDOWNLOADEDINSTRUMENT
iface
)
{
IDirectMusicDownloadedInstrumentImpl
*
This
=
(
IDirectMusicDownloadedInstrumentImpl
*
)
iface
;
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
if
(
ref
==
0
)
{
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
Count
;
}
/* IDirectMusicDownloadedInstrumentImpl IDirectMusicDownloadedInstrument part: */
...
...
dlls/dmusic/instrument.c
View file @
ba92d292
...
...
@@ -54,18 +54,23 @@ HRESULT WINAPI IDirectMusicInstrumentImpl_IUnknown_QueryInterface (LPUNKNOWN ifa
ULONG
WINAPI
IDirectMusicInstrumentImpl_IUnknown_AddRef
(
LPUNKNOWN
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicInstrumentImpl
,
UnknownVtbl
,
iface
);
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
ULONG
WINAPI
IDirectMusicInstrumentImpl_IUnknown_Release
(
LPUNKNOWN
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicInstrumentImpl
,
UnknownVtbl
,
iface
);
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
if
(
ref
==
0
)
{
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
Count
;
}
IUnknownVtbl
DirectMusicInstrument_Unknown_Vtbl
=
{
...
...
dlls/dmusic/port.c
View file @
ba92d292
...
...
@@ -37,18 +37,23 @@ HRESULT WINAPI IDirectMusicPortImpl_QueryInterface (LPDIRECTMUSICPORT iface, REF
ULONG
WINAPI
IDirectMusicPortImpl_AddRef
(
LPDIRECTMUSICPORT
iface
)
{
IDirectMusicPortImpl
*
This
=
(
IDirectMusicPortImpl
*
)
iface
;
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
ULONG
WINAPI
IDirectMusicPortImpl_Release
(
LPDIRECTMUSICPORT
iface
)
{
IDirectMusicPortImpl
*
This
=
(
IDirectMusicPortImpl
*
)
iface
;
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
if
(
ref
==
0
)
{
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
Count
;
}
/* IDirectMusicPortImpl IDirectMusicPort part: */
...
...
dlls/dmusic/portdownload.c
View file @
ba92d292
...
...
@@ -37,18 +37,23 @@ HRESULT WINAPI IDirectMusicPortDownloadImpl_QueryInterface (LPDIRECTMUSICPORTDOW
ULONG
WINAPI
IDirectMusicPortDownloadImpl_AddRef
(
LPDIRECTMUSICPORTDOWNLOAD
iface
)
{
IDirectMusicPortDownloadImpl
*
This
=
(
IDirectMusicPortDownloadImpl
*
)
iface
;
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
ULONG
WINAPI
IDirectMusicPortDownloadImpl_Release
(
LPDIRECTMUSICPORTDOWNLOAD
iface
)
{
IDirectMusicPortDownloadImpl
*
This
=
(
IDirectMusicPortDownloadImpl
*
)
iface
;
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
if
(
ref
==
0
)
{
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
Count
;
}
/* IDirectMusicPortDownload Interface follow: */
...
...
dlls/dmusic/thru.c
View file @
ba92d292
...
...
@@ -38,18 +38,23 @@ HRESULT WINAPI IDirectMusicThruImpl_QueryInterface (LPDIRECTMUSICTHRU iface, REF
ULONG
WINAPI
IDirectMusicThruImpl_AddRef
(
LPDIRECTMUSICTHRU
iface
)
{
IDirectMusicThruImpl
*
This
=
(
IDirectMusicThruImpl
*
)
iface
;
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
ULONG
WINAPI
IDirectMusicThruImpl_Release
(
LPDIRECTMUSICTHRU
iface
)
{
IDirectMusicThruImpl
*
This
=
(
IDirectMusicThruImpl
*
)
iface
;
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
if
(
ref
==
0
)
{
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
Count
;
}
/* IDirectMusicThru Interface follow: */
...
...
dlls/dpnet/address.c
View file @
ba92d292
...
...
@@ -54,18 +54,23 @@ HRESULT WINAPI IDirectPlay8AddressImpl_QueryInterface(PDIRECTPLAY8ADDRESS iface,
ULONG
WINAPI
IDirectPlay8AddressImpl_AddRef
(
PDIRECTPLAY8ADDRESS
iface
)
{
IDirectPlay8AddressImpl
*
This
=
(
IDirectPlay8AddressImpl
*
)
iface
;
TRACE
(
"(%p) : AddRef from %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
ULONG
WINAPI
IDirectPlay8AddressImpl_Release
(
PDIRECTPLAY8ADDRESS
iface
)
{
IDirectPlay8AddressImpl
*
This
=
(
IDirectPlay8AddressImpl
*
)
iface
;
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p) : ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
if
(
ref
==
0
)
{
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
Count
;
}
/* IDirectPlay8Address Interface follow: */
...
...
dlls/dpnet/client.c
View file @
ba92d292
...
...
@@ -54,18 +54,23 @@ HRESULT WINAPI IDirectPlay8ClientImpl_QueryInterface(PDIRECTPLAY8CLIENT iface, R
ULONG
WINAPI
IDirectPlay8ClientImpl_AddRef
(
PDIRECTPLAY8CLIENT
iface
)
{
IDirectPlay8ClientImpl
*
This
=
(
IDirectPlay8ClientImpl
*
)
iface
;
TRACE
(
"(%p) : AddRef from %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
ULONG
WINAPI
IDirectPlay8ClientImpl_Release
(
PDIRECTPLAY8CLIENT
iface
)
{
IDirectPlay8ClientImpl
*
This
=
(
IDirectPlay8ClientImpl
*
)
iface
;
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p) : ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
if
(
ref
==
0
)
{
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
Count
;
}
/* IDirectPlay8Client Interface follow: */
...
...
dlls/dswave/dswave.c
View file @
ba92d292
...
...
@@ -64,18 +64,23 @@ HRESULT WINAPI IDirectMusicWaveImpl_IUnknown_QueryInterface (LPUNKNOWN iface, RE
ULONG
WINAPI
IDirectMusicWaveImpl_IUnknown_AddRef
(
LPUNKNOWN
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicWaveImpl
,
UnknownVtbl
,
iface
);
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
ULONG
WINAPI
IDirectMusicWaveImpl_IUnknown_Release
(
LPUNKNOWN
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicWaveImpl
,
UnknownVtbl
,
iface
);
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p): ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
if
(
ref
==
0
)
{
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
Count
;
}
IUnknownVtbl
DirectMusicWave_Unknown_Vtbl
=
{
...
...
dlls/dswave/dswave_main.c
View file @
ba92d292
...
...
@@ -40,13 +40,13 @@ static HRESULT WINAPI WaveCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPV
static
ULONG
WINAPI
WaveCF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
return
++
(
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
WaveCF_Release
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
/* static class, won't be freed */
return
--
(
This
->
ref
);
return
InterlockedDecrement
(
&
This
->
ref
);
}
static
HRESULT
WINAPI
WaveCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
...
...
dlls/dxdiagn/container.c
View file @
ba92d292
...
...
@@ -44,18 +44,23 @@ HRESULT WINAPI IDxDiagContainerImpl_QueryInterface(PDXDIAGCONTAINER iface, REFII
ULONG
WINAPI
IDxDiagContainerImpl_AddRef
(
PDXDIAGCONTAINER
iface
)
{
IDxDiagContainerImpl
*
This
=
(
IDxDiagContainerImpl
*
)
iface
;
TRACE
(
"(%p) : AddRef from %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
ULONG
WINAPI
IDxDiagContainerImpl_Release
(
PDXDIAGCONTAINER
iface
)
{
IDxDiagContainerImpl
*
This
=
(
IDxDiagContainerImpl
*
)
iface
;
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p) : ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
if
(
ref
==
0
)
{
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
Count
;
}
/* IDxDiagContainer Interface follow: */
...
...
dlls/dxdiagn/provider.c
View file @
ba92d292
...
...
@@ -43,18 +43,23 @@ HRESULT WINAPI IDxDiagProviderImpl_QueryInterface(PDXDIAGPROVIDER iface, REFIID
ULONG
WINAPI
IDxDiagProviderImpl_AddRef
(
PDXDIAGPROVIDER
iface
)
{
IDxDiagProviderImpl
*
This
=
(
IDxDiagProviderImpl
*
)
iface
;
TRACE
(
"(%p) : AddRef from %ld
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
ULONG
WINAPI
IDxDiagProviderImpl_Release
(
PDXDIAGPROVIDER
iface
)
{
IDxDiagProviderImpl
*
This
=
(
IDxDiagProviderImpl
*
)
iface
;
ULONG
ref
=
--
This
->
ref
;
TRACE
(
"(%p) : ReleaseRef to %ld
\n
"
,
This
,
This
->
ref
);
if
(
ref
==
0
)
{
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
ref
;
return
ref
Count
;
}
/* IDxDiagProvider Interface follow: */
...
...
dlls/msdmo/dmoreg.c
View file @
ba92d292
...
...
@@ -383,7 +383,7 @@ lerr:
static
ULONG
WINAPI
IEnumDMO_fnAddRef
(
IEnumDMO
*
iface
)
{
IEnumDMOImpl
*
This
=
(
IEnumDMOImpl
*
)
iface
;
return
++
(
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
...
...
@@ -420,15 +420,14 @@ static HRESULT WINAPI IEnumDMO_fnQueryInterface(
static
ULONG
WINAPI
IEnumDMO_fnRelease
(
IEnumDMO
*
iface
)
{
IEnumDMOImpl
*
This
=
(
IEnumDMOImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
!
--
(
This
->
ref
)
)
if
(
!
refCount
)
{
IEnumDMO_Destructor
((
IEnumDMO
*
)
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
0
;
}
return
This
->
ref
;
return
refCount
;
}
...
...
dlls/oleaut32/connpt.c
View file @
ba92d292
...
...
@@ -196,8 +196,11 @@ static HRESULT WINAPI ConnectionPointImpl_QueryInterface(
static
ULONG
WINAPI
ConnectionPointImpl_AddRef
(
IConnectionPoint
*
iface
)
{
ConnectionPointImpl
*
This
=
(
ConnectionPointImpl
*
)
iface
;
TRACE
(
"(%p)->(ref=%ld)
\n
"
,
This
,
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%ld)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
/************************************************************************
...
...
@@ -209,20 +212,16 @@ static ULONG WINAPI ConnectionPointImpl_Release(
IConnectionPoint
*
iface
)
{
ConnectionPointImpl
*
This
=
(
ConnectionPointImpl
*
)
iface
;
ULONG
ref
;
TRACE
(
"(%p)->(ref=%ld)
\n
"
,
This
,
This
->
ref
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
/*
* Decrease the reference count on this object.
*/
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%ld)
\n
"
,
This
,
refCount
+
1
);
/*
* If the reference count goes down to 0, perform suicide.
*/
if
(
ref
==
0
)
ConnectionPointImpl_Destroy
(
This
);
if
(
!
refCount
)
ConnectionPointImpl_Destroy
(
This
);
return
ref
;
return
ref
Count
;
}
/************************************************************************
...
...
@@ -470,11 +469,12 @@ static HRESULT WINAPI EnumConnectionsImpl_QueryInterface(
static
ULONG
WINAPI
EnumConnectionsImpl_AddRef
(
IEnumConnections
*
iface
)
{
EnumConnectionsImpl
*
This
=
(
EnumConnectionsImpl
*
)
iface
;
ULONG
ref
;
TRACE
(
"(%p)->(ref=%ld)
\n
"
,
This
,
This
->
ref
);
ref
=
InterlockedIncrement
(
&
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%ld)
\n
"
,
This
,
refCount
-
1
);
IUnknown_AddRef
(
This
->
pUnk
);
return
ref
;
return
ref
Count
;
}
/************************************************************************
...
...
@@ -485,22 +485,18 @@ static ULONG WINAPI EnumConnectionsImpl_AddRef(IEnumConnections* iface)
static
ULONG
WINAPI
EnumConnectionsImpl_Release
(
IEnumConnections
*
iface
)
{
EnumConnectionsImpl
*
This
=
(
EnumConnectionsImpl
*
)
iface
;
ULONG
ref
;
TRACE
(
"(%p)->(ref=%ld)
\n
"
,
This
,
This
->
ref
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
IUnknown_Release
(
This
->
pUnk
);
TRACE
(
"(%p)->(ref before=%ld)
\n
"
,
This
,
refCount
+
1
);
/*
* Decrease the reference count on this object.
*/
ref
=
InterlockedDecrement
(
&
This
->
ref
);
IUnknown_Release
(
This
->
pUnk
);
/*
* If the reference count goes down to 0, perform suicide.
*/
if
(
ref
==
0
)
EnumConnectionsImpl_Destroy
(
This
);
if
(
!
refCount
)
EnumConnectionsImpl_Destroy
(
This
);
return
ref
;
return
ref
Count
;
}
/************************************************************************
...
...
dlls/oleaut32/dispatch.c
View file @
ba92d292
...
...
@@ -256,9 +256,11 @@ static HRESULT WINAPI StdDispatch_QueryInterface(
static
ULONG
WINAPI
StdDispatch_AddRef
(
LPDISPATCH
iface
)
{
StdDispatch
*
This
=
(
StdDispatch
*
)
iface
;
TRACE
(
"()
\n
"
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
/******************************************************************************
...
...
@@ -269,18 +271,17 @@ static ULONG WINAPI StdDispatch_AddRef(LPDISPATCH iface)
static
ULONG
WINAPI
StdDispatch_Release
(
LPDISPATCH
iface
)
{
StdDispatch
*
This
=
(
StdDispatch
*
)
iface
;
ULONG
ref
;
TRACE
(
"(%p)->()
\n
"
,
This
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
ref
==
0
)
if
(
!
refCount
)
{
ITypeInfo_Release
(
This
->
pTypeInfo
);
CoTaskMemFree
(
This
);
}
return
ref
;
return
ref
Count
;
}
/******************************************************************************
...
...
dlls/oleaut32/olepicture.c
View file @
ba92d292
...
...
@@ -409,8 +409,11 @@ static ULONG WINAPI OLEPictureImpl_AddRef(
IPicture
*
iface
)
{
OLEPictureImpl
*
This
=
(
OLEPictureImpl
*
)
iface
;
TRACE
(
"(%p)->(ref=%ld)
\n
"
,
This
,
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%ld)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
/************************************************************************
...
...
@@ -422,20 +425,16 @@ static ULONG WINAPI OLEPictureImpl_Release(
IPicture
*
iface
)
{
OLEPictureImpl
*
This
=
(
OLEPictureImpl
*
)
iface
;
ULONG
ret
;
TRACE
(
"(%p)->(ref=%ld)
\n
"
,
This
,
This
->
ref
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
/*
* Decrease the reference count on this object.
*/
ret
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%ld)
\n
"
,
This
,
refCount
+
1
);
/*
* If the reference count goes down to 0, perform suicide.
*/
if
(
ret
==
0
)
OLEPictureImpl_Destroy
(
This
);
if
(
!
refCount
)
OLEPictureImpl_Destroy
(
This
);
return
ret
;
return
re
fCoun
t
;
}
...
...
dlls/oleaut32/tmarshal.c
View file @
ba92d292
...
...
@@ -336,29 +336,29 @@ static ULONG WINAPI
TMProxyImpl_AddRef
(
LPRPCPROXYBUFFER
iface
)
{
ICOM_THIS_MULTI
(
TMProxyImpl
,
lpvtbl2
,
iface
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(
)
\n
"
);
TRACE
(
"(
%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
InterlockedIncrement
(
&
This
->
ref
)
;
return
refCount
;
}
static
ULONG
WINAPI
TMProxyImpl_Release
(
LPRPCPROXYBUFFER
iface
)
{
ULONG
refs
;
ICOM_THIS_MULTI
(
TMProxyImpl
,
lpvtbl2
,
iface
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(
)
\n
"
);
TRACE
(
"(
%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
refs
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
!
refs
)
if
(
!
refCount
)
{
DeleteCriticalSection
(
&
This
->
crit
);
if
(
This
->
chanbuf
)
IRpcChannelBuffer_Release
(
This
->
chanbuf
);
VirtualFree
(
This
->
asmstubs
,
0
,
MEM_RELEASE
);
CoTaskMemFree
(
This
);
}
return
ref
s
;
return
ref
Count
;
}
static
HRESULT
WINAPI
...
...
@@ -1505,27 +1505,27 @@ static ULONG WINAPI
TMStubImpl_AddRef
(
LPRPCSTUBBUFFER
iface
)
{
TMStubImpl
*
This
=
(
TMStubImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)
before %lu
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)
->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
InterlockedIncrement
(
&
This
->
ref
)
;
return
refCount
;
}
static
ULONG
WINAPI
TMStubImpl_Release
(
LPRPCSTUBBUFFER
iface
)
{
ULONG
refs
;
TMStubImpl
*
This
=
(
TMStubImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)
after %lu
\n
"
,
This
,
This
->
ref
-
1
);
TRACE
(
"(%p)
->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
refs
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
!
refs
)
if
(
!
refCount
)
{
IRpcStubBuffer_Disconnect
(
iface
);
CoTaskMemFree
(
This
);
}
return
ref
s
;
return
ref
Count
;
}
static
HRESULT
WINAPI
...
...
dlls/shdocvw/classinfo.c
View file @
ba92d292
...
...
@@ -47,18 +47,22 @@ static HRESULT WINAPI WBPCI_QueryInterface(LPPROVIDECLASSINFO iface,
static
ULONG
WINAPI
WBPCI_AddRef
(
LPPROVIDECLASSINFO
iface
)
{
IProvideClassInfoImpl
*
This
=
(
IProvideClassInfoImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"
\n
"
);
return
++
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
static
ULONG
WINAPI
WBPCI_Release
(
LPPROVIDECLASSINFO
iface
)
{
IProvideClassInfoImpl
*
This
=
(
IProvideClassInfoImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
/* static class, won't be freed */
TRACE
(
"
\n
"
);
return
--
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
return
refCount
;
}
/* Return an ITypeInfo interface to retrieve type library info about
...
...
@@ -102,18 +106,22 @@ static HRESULT WINAPI WBPCI2_QueryInterface(LPPROVIDECLASSINFO2 iface,
static
ULONG
WINAPI
WBPCI2_AddRef
(
LPPROVIDECLASSINFO2
iface
)
{
IProvideClassInfo2Impl
*
This
=
(
IProvideClassInfo2Impl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"
\n
"
);
return
++
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
static
ULONG
WINAPI
WBPCI2_Release
(
LPPROVIDECLASSINFO2
iface
)
{
IProvideClassInfo2Impl
*
This
=
(
IProvideClassInfo2Impl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
/* static class, won't be freed */
TRACE
(
"
\n
"
);
return
--
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
return
refCount
;
}
/* Return an ITypeInfo interface to retrieve type library info about
...
...
dlls/shdocvw/events.c
View file @
ba92d292
...
...
@@ -47,18 +47,22 @@ static HRESULT WINAPI WBCPC_QueryInterface(LPCONNECTIONPOINTCONTAINER iface,
static
ULONG
WINAPI
WBCPC_AddRef
(
LPCONNECTIONPOINTCONTAINER
iface
)
{
IConnectionPointContainerImpl
*
This
=
(
IConnectionPointContainerImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"
\n
"
);
return
++
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
static
ULONG
WINAPI
WBCPC_Release
(
LPCONNECTIONPOINTCONTAINER
iface
)
{
IConnectionPointContainerImpl
*
This
=
(
IConnectionPointContainerImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
/* static class, won't be freed */
TRACE
(
"
\n
"
);
return
--
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
return
refCount
;
}
/* Get a list of connection points inside this container. */
...
...
@@ -131,18 +135,22 @@ static HRESULT WINAPI WBCP_QueryInterface(LPCONNECTIONPOINT iface,
static
ULONG
WINAPI
WBCP_AddRef
(
LPCONNECTIONPOINT
iface
)
{
IConnectionPointImpl
*
This
=
(
IConnectionPointImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"
\n
"
);
return
++
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
static
ULONG
WINAPI
WBCP_Release
(
LPCONNECTIONPOINT
iface
)
{
IConnectionPointImpl
*
This
=
(
IConnectionPointImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
/* static class, won't be freed */
TRACE
(
"
\n
"
);
return
--
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
return
refCount
;
}
static
HRESULT
WINAPI
WBCP_GetConnectionInterface
(
LPCONNECTIONPOINT
iface
,
IID
*
pIId
)
...
...
dlls/shdocvw/factory.c
View file @
ba92d292
...
...
@@ -55,9 +55,11 @@ static HRESULT WINAPI WBCF_QueryInterface(LPCLASSFACTORY iface,
static
ULONG
WINAPI
WBCF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"
\n
"
);
return
++
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
/************************************************************************
...
...
@@ -66,10 +68,12 @@ static ULONG WINAPI WBCF_AddRef(LPCLASSFACTORY iface)
static
ULONG
WINAPI
WBCF_Release
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
/* static class, won't be freed */
TRACE
(
"
\n
"
);
return
--
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
return
refCount
;
}
/************************************************************************
...
...
dlls/shdocvw/misc.c
View file @
ba92d292
...
...
@@ -41,18 +41,22 @@ static HRESULT WINAPI WBQA_QueryInterface(LPQUICKACTIVATE iface,
static
ULONG
WINAPI
WBQA_AddRef
(
LPQUICKACTIVATE
iface
)
{
IQuickActivateImpl
*
This
=
(
IQuickActivateImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"
\n
"
);
return
++
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
static
ULONG
WINAPI
WBQA_Release
(
LPQUICKACTIVATE
iface
)
{
IQuickActivateImpl
*
This
=
(
IQuickActivateImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
/* static class, won't be freed */
TRACE
(
"
\n
"
);
return
--
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
return
refCount
;
}
/* Alternative interface for quicker, easier activation of a control. */
...
...
dlls/shdocvw/oleobject.c
View file @
ba92d292
...
...
@@ -144,9 +144,11 @@ static HRESULT WINAPI WBOOBJ_QueryInterface(LPOLEOBJECT iface,
static
ULONG
WINAPI
WBOOBJ_AddRef
(
LPOLEOBJECT
iface
)
{
IOleObjectImpl
*
This
=
(
IOleObjectImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"
\n
"
);
return
++
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
/************************************************************************
...
...
@@ -155,10 +157,12 @@ static ULONG WINAPI WBOOBJ_AddRef(LPOLEOBJECT iface)
static
ULONG
WINAPI
WBOOBJ_Release
(
LPOLEOBJECT
iface
)
{
IOleObjectImpl
*
This
=
(
IOleObjectImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
/* static class, won't be freed */
TRACE
(
"
\n
"
);
return
--
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
return
refCount
;
}
/************************************************************************
...
...
@@ -457,18 +461,22 @@ static HRESULT WINAPI WBOIPO_QueryInterface(LPOLEINPLACEOBJECT iface,
static
ULONG
WINAPI
WBOIPO_AddRef
(
LPOLEINPLACEOBJECT
iface
)
{
IOleInPlaceObjectImpl
*
This
=
(
IOleInPlaceObjectImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
TRACE
(
"
\n
"
);
return
++
(
This
->
ref
);
return
refCount
;
}
static
ULONG
WINAPI
WBOIPO_Release
(
LPOLEINPLACEOBJECT
iface
)
{
IOleInPlaceObjectImpl
*
This
=
(
IOleInPlaceObjectImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
/* static class, won't be freed */
TRACE
(
"
\n
"
);
return
--
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
return
refCount
;
}
static
HRESULT
WINAPI
WBOIPO_GetWindow
(
LPOLEINPLACEOBJECT
iface
,
HWND
*
phwnd
)
...
...
@@ -559,18 +567,22 @@ static HRESULT WINAPI WBOC_QueryInterface(LPOLECONTROL iface,
static
ULONG
WINAPI
WBOC_AddRef
(
LPOLECONTROL
iface
)
{
IOleControlImpl
*
This
=
(
IOleControlImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
TRACE
(
"
\n
"
);
return
++
(
This
->
ref
);
return
refCount
;
}
static
ULONG
WINAPI
WBOC_Release
(
LPOLECONTROL
iface
)
{
IOleControlImpl
*
This
=
(
IOleControlImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
/* static class, won't be freed */
TRACE
(
"
\n
"
);
return
--
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
return
refCount
;
}
static
HRESULT
WINAPI
WBOC_GetControlInfo
(
LPOLECONTROL
iface
,
LPCONTROLINFO
pCI
)
...
...
dlls/shdocvw/persist.c
View file @
ba92d292
...
...
@@ -39,18 +39,22 @@ static HRESULT WINAPI WBPS_QueryInterface(LPPERSISTSTORAGE iface,
static
ULONG
WINAPI
WBPS_AddRef
(
LPPERSISTSTORAGE
iface
)
{
IPersistStorageImpl
*
This
=
(
IPersistStorageImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"
\n
"
);
return
++
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
static
ULONG
WINAPI
WBPS_Release
(
LPPERSISTSTORAGE
iface
)
{
IPersistStorageImpl
*
This
=
(
IPersistStorageImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
/* static class, won't be freed */
TRACE
(
"
\n
"
);
return
--
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
return
refCount
;
}
static
HRESULT
WINAPI
WBPS_GetClassID
(
LPPERSISTSTORAGE
iface
,
CLSID
*
pClassID
)
...
...
@@ -126,18 +130,22 @@ static HRESULT WINAPI WBPSI_QueryInterface(LPPERSISTSTREAMINIT iface,
static
ULONG
WINAPI
WBPSI_AddRef
(
LPPERSISTSTREAMINIT
iface
)
{
IPersistStreamInitImpl
*
This
=
(
IPersistStreamInitImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"
\n
"
);
return
++
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
static
ULONG
WINAPI
WBPSI_Release
(
LPPERSISTSTREAMINIT
iface
)
{
IPersistStreamInitImpl
*
This
=
(
IPersistStreamInitImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
/* static class, won't be freed */
TRACE
(
"
\n
"
);
return
--
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
return
refCount
;
}
static
HRESULT
WINAPI
WBPSI_GetClassID
(
LPPERSISTSTREAMINIT
iface
,
CLSID
*
pClassID
)
...
...
dlls/shdocvw/webbrowser.c
View file @
ba92d292
...
...
@@ -38,18 +38,22 @@ static HRESULT WINAPI WB_QueryInterface(IWebBrowser *iface, REFIID riid, LPVOID
static
ULONG
WINAPI
WB_AddRef
(
IWebBrowser
*
iface
)
{
IWebBrowserImpl
*
This
=
(
IWebBrowserImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"
\n
"
);
return
++
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
static
ULONG
WINAPI
WB_Release
(
IWebBrowser
*
iface
)
{
IWebBrowserImpl
*
This
=
(
IWebBrowserImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
/* static class, won't be freed */
TRACE
(
"
\n
"
);
return
--
(
This
->
ref
);
TRACE
(
"(%p)->(ref before=%lu)
\n
"
,
This
,
refCount
+
1
);
return
refCount
;
}
/* IDispatch methods */
...
...
dlls/shell32/autocomplete.c
View file @
ba92d292
...
...
@@ -170,9 +170,11 @@ static ULONG WINAPI IAutoComplete_fnAddRef(
IAutoComplete
*
iface
)
{
IAutoCompleteImpl
*
This
=
(
IAutoCompleteImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%lu)
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
TRACE
(
"(%p)->(%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
/******************************************************************************
...
...
@@ -182,10 +184,11 @@ static ULONG WINAPI IAutoComplete_fnRelease(
IAutoComplete
*
iface
)
{
IAutoCompleteImpl
*
This
=
(
IAutoCompleteImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
--
(
This
->
ref
)
)
{
if
(
!
refCount
)
{
TRACE
(
" destroying IAutoComplete(%p)
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
quickComplete
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
txtbackup
);
...
...
@@ -194,9 +197,8 @@ static ULONG WINAPI IAutoComplete_fnRelease(
if
(
This
->
enumstr
)
IEnumString_Release
(
This
->
enumstr
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
0
;
}
return
This
->
ref
;
return
refCount
;
}
/******************************************************************************
...
...
dlls/shell32/cpanelfolder.c
View file @
ba92d292
...
...
@@ -181,26 +181,27 @@ static HRESULT WINAPI ISF_ControlPanel_fnQueryInterface(IShellFolder2 * iface, R
static
ULONG
WINAPI
ISF_ControlPanel_fnAddRef
(
IShellFolder2
*
iface
)
{
ICPanelImpl
*
This
=
(
ICPanelImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
-
1
);
return
++
(
This
->
ref
)
;
return
refCount
;
}
static
ULONG
WINAPI
ISF_ControlPanel_fnRelease
(
IShellFolder2
*
iface
)
{
ICPanelImpl
*
This
=
(
ICPanelImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
--
(
This
->
ref
)
)
{
if
(
!
refCount
)
{
TRACE
(
"-- destroying IShellFolder(%p)
\n
"
,
This
);
if
(
This
->
pidlRoot
)
SHFree
(
This
->
pidlRoot
);
LocalFree
((
HLOCAL
)
This
);
return
0
;
}
return
This
->
ref
;
return
refCount
;
}
/**************************************************************************
...
...
dlls/shell32/dataobject.c
View file @
ba92d292
...
...
@@ -124,16 +124,21 @@ static HRESULT WINAPI IEnumFORMATETC_fnQueryInterface(LPENUMFORMATETC iface, REF
static
ULONG
WINAPI
IEnumFORMATETC_fnAddRef
(
LPENUMFORMATETC
iface
)
{
IEnumFORMATETCImpl
*
This
=
(
IEnumFORMATETCImpl
*
)
iface
;
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
static
ULONG
WINAPI
IEnumFORMATETC_fnRelease
(
LPENUMFORMATETC
iface
)
{
IEnumFORMATETCImpl
*
This
=
(
IEnumFORMATETCImpl
*
)
iface
;
TRACE
(
"(%p)->()
\n
"
,
This
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
!--
(
This
->
ref
))
TRACE
(
"(%p)->(%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
TRACE
(
" destroying IEnumFORMATETC(%p)
\n
"
,
This
);
if
(
This
->
pFmt
)
...
...
@@ -143,7 +148,7 @@ static ULONG WINAPI IEnumFORMATETC_fnRelease(LPENUMFORMATETC iface)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
0
;
}
return
This
->
ref
;
return
refCount
;
}
static
HRESULT
WINAPI
IEnumFORMATETC_fnNext
(
LPENUMFORMATETC
iface
,
ULONG
celt
,
FORMATETC
*
rgelt
,
ULONG
*
pceltFethed
)
...
...
@@ -291,8 +296,11 @@ static HRESULT WINAPI IDataObject_fnQueryInterface(LPDATAOBJECT iface, REFIID ri
static
ULONG
WINAPI
IDataObject_fnAddRef
(
LPDATAOBJECT
iface
)
{
IDataObjectImpl
*
This
=
(
IDataObjectImpl
*
)
iface
;
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
/**************************************************************************
...
...
@@ -301,17 +309,18 @@ static ULONG WINAPI IDataObject_fnAddRef(LPDATAOBJECT iface)
static
ULONG
WINAPI
IDataObject_fnRelease
(
LPDATAOBJECT
iface
)
{
IDataObjectImpl
*
This
=
(
IDataObjectImpl
*
)
iface
;
TRACE
(
"(%p)->()
\n
"
,
This
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
--
(
This
->
ref
)
)
if
(
!
refCount
)
{
TRACE
(
" destroying IDataObject(%p)
\n
"
,
This
);
_ILFreeaPidl
(
This
->
apidl
,
This
->
cidl
);
ILFree
(
This
->
pidl
),
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
0
;
}
return
This
->
ref
;
return
refCount
;
}
/**************************************************************************
...
...
dlls/shell32/dragdrophelper.c
View file @
ba92d292
...
...
@@ -113,24 +113,26 @@ static HRESULT WINAPI IDropTargetHelper_fnQueryInterface (IDropTargetHelper * if
static
ULONG
WINAPI
IDropTargetHelper_fnAddRef
(
IDropTargetHelper
*
iface
)
{
IDropTargetHelperImpl
*
This
=
(
IDropTargetHelperImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
-
1
);
return
++
(
This
->
ref
)
;
return
refCount
;
}
static
ULONG
WINAPI
IDropTargetHelper_fnRelease
(
IDropTargetHelper
*
iface
)
{
IDropTargetHelperImpl
*
This
=
(
IDropTargetHelperImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
--
(
This
->
ref
)
)
{
if
(
!
refCount
)
{
TRACE
(
"-- destroying (%p)
\n
"
,
This
);
LocalFree
((
HLOCAL
)
This
);
return
0
;
}
return
This
->
ref
;
return
refCount
;
}
static
HRESULT
WINAPI
IDropTargetHelper_fnDragEnter
(
...
...
dlls/shell32/enumidlist.c
View file @
ba92d292
...
...
@@ -240,8 +240,11 @@ static ULONG WINAPI IEnumIDList_fnAddRef(
IEnumIDList
*
iface
)
{
IEnumIDListImpl
*
This
=
(
IEnumIDListImpl
*
)
iface
;
TRACE
(
"(%p)->(%lu)
\n
"
,
This
,
This
->
ref
);
return
++
(
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
/******************************************************************************
* IEnumIDList_fnRelease
...
...
@@ -250,16 +253,16 @@ static ULONG WINAPI IEnumIDList_fnRelease(
IEnumIDList
*
iface
)
{
IEnumIDListImpl
*
This
=
(
IEnumIDListImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
--
(
This
->
ref
)
)
{
if
(
!
refCount
)
{
TRACE
(
" destroying IEnumIDList(%p)
\n
"
,
This
);
DeleteList
((
IEnumIDList
*
)
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
0
;
}
return
This
->
ref
;
return
refCount
;
}
/**************************************************************************
...
...
dlls/shell32/folders.c
View file @
ba92d292
...
...
@@ -130,10 +130,11 @@ static HRESULT WINAPI IExtractIconW_fnQueryInterface(IExtractIconW *iface, REFII
static
ULONG
WINAPI
IExtractIconW_fnAddRef
(
IExtractIconW
*
iface
)
{
IExtractIconWImpl
*
This
=
(
IExtractIconWImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
-
1
);
return
++
(
This
->
ref
)
;
return
refCount
;
}
/**************************************************************************
* IExtractIconW_Release
...
...
@@ -141,17 +142,18 @@ static ULONG WINAPI IExtractIconW_fnAddRef(IExtractIconW * iface)
static
ULONG
WINAPI
IExtractIconW_fnRelease
(
IExtractIconW
*
iface
)
{
IExtractIconWImpl
*
This
=
(
IExtractIconWImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(
)
\n
"
,
This
);
TRACE
(
"(%p)->(
count=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
--
(
This
->
ref
)
)
if
(
!
refCount
)
{
TRACE
(
" destroying IExtractIcon(%p)
\n
"
,
This
);
SHFree
(
This
->
pidl
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
0
;
}
return
This
->
ref
;
return
refCount
;
}
static
HRESULT
getIconLocationForFolder
(
IExtractIconW
*
iface
,
UINT
uFlags
,
...
...
dlls/shell32/memorystream.c
View file @
ba92d292
...
...
@@ -127,10 +127,11 @@ static HRESULT WINAPI IStream_fnQueryInterface(IStream *iface, REFIID riid, LPVO
static
ULONG
WINAPI
IStream_fnAddRef
(
IStream
*
iface
)
{
ISHFileStream
*
This
=
(
ISHFileStream
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
-
1
);
return
++
(
This
->
ref
)
;
return
refCount
;
}
/**************************************************************************
...
...
@@ -139,16 +140,17 @@ static ULONG WINAPI IStream_fnAddRef(IStream *iface)
static
ULONG
WINAPI
IStream_fnRelease
(
IStream
*
iface
)
{
ISHFileStream
*
This
=
(
ISHFileStream
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(
)
\n
"
,
This
);
TRACE
(
"(%p)->(
count=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
--
(
This
->
ref
)
)
if
(
!
refCount
)
{
TRACE
(
" destroying SHFileStream (%p)
\n
"
,
This
);
CloseHandle
(
This
->
handle
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
return
This
->
ref
;
return
refCount
;
}
static
HRESULT
WINAPI
IStream_fnRead
(
IStream
*
iface
,
void
*
pv
,
ULONG
cb
,
ULONG
*
pcbRead
)
...
...
dlls/shell32/shelllink.c
View file @
ba92d292
...
...
@@ -974,10 +974,11 @@ static HRESULT WINAPI IShellLinkA_fnQueryInterface( IShellLinkA * iface, REFIID
static
ULONG
WINAPI
IShellLinkA_fnAddRef
(
IShellLinkA
*
iface
)
{
IShellLinkImpl
*
This
=
(
IShellLinkImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
-
1
);
return
++
(
This
->
ref
)
;
return
refCount
;
}
/******************************************************************************
* IShellLinkA_Release
...
...
@@ -985,11 +986,12 @@ static ULONG WINAPI IShellLinkA_fnAddRef(IShellLinkA * iface)
static
ULONG
WINAPI
IShellLinkA_fnRelease
(
IShellLinkA
*
iface
)
{
IShellLinkImpl
*
This
=
(
IShellLinkImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
--
(
This
->
ref
)
)
return
This
->
ref
;
if
(
refCount
)
return
refCount
;
TRACE
(
"-- destroying IShellLink(%p)
\n
"
,
This
);
...
...
dlls/shell32/shellole.c
View file @
ba92d292
...
...
@@ -556,9 +556,11 @@ static HRESULT WINAPI IDefClF_fnQueryInterface(
static
ULONG
WINAPI
IDefClF_fnAddRef
(
LPCLASSFACTORY
iface
)
{
IDefClFImpl
*
This
=
(
IDefClFImpl
*
)
iface
;
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
/******************************************************************************
* IDefClF_fnRelease
...
...
@@ -566,9 +568,11 @@ static ULONG WINAPI IDefClF_fnAddRef(LPCLASSFACTORY iface)
static
ULONG
WINAPI
IDefClF_fnRelease
(
LPCLASSFACTORY
iface
)
{
IDefClFImpl
*
This
=
(
IDefClFImpl
*
)
iface
;
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
InterlockedDecrement
(
&
This
->
ref
)
)
if
(
!
refCount
)
{
if
(
This
->
pcRefDll
)
InterlockedDecrement
(
This
->
pcRefDll
);
...
...
@@ -576,7 +580,7 @@ static ULONG WINAPI IDefClF_fnRelease(LPCLASSFACTORY iface)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
0
;
}
return
This
->
ref
;
return
refCount
;
}
/******************************************************************************
* IDefClF_fnCreateInstance
...
...
dlls/shell32/shfldr_desktop.c
View file @
ba92d292
...
...
@@ -157,19 +157,21 @@ static HRESULT WINAPI ISF_Desktop_fnQueryInterface (IShellFolder2 * iface, REFII
static
ULONG
WINAPI
ISF_Desktop_fnAddRef
(
IShellFolder2
*
iface
)
{
IGenericSFImpl
*
This
=
(
IGenericSFImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
-
1
);
return
++
(
This
->
ref
)
;
return
refCount
;
}
static
ULONG
WINAPI
ISF_Desktop_fnRelease
(
IShellFolder2
*
iface
)
{
IGenericSFImpl
*
This
=
(
IGenericSFImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
--
(
This
->
ref
)
)
{
if
(
!
refCount
)
{
TRACE
(
"-- destroying IShellFolder(%p)
\n
"
,
This
);
if
(
This
->
pidlRoot
)
SHFree
(
This
->
pidlRoot
);
...
...
@@ -178,7 +180,7 @@ static ULONG WINAPI ISF_Desktop_fnRelease (IShellFolder2 * iface)
LocalFree
((
HLOCAL
)
This
);
return
0
;
}
return
This
->
ref
;
return
refCount
;
}
/**************************************************************************
...
...
dlls/shell32/shfldr_fs.c
View file @
ba92d292
...
...
@@ -173,19 +173,21 @@ static HRESULT WINAPI IUnknown_fnQueryInterface (IUnknown * iface, REFIID riid,
static
ULONG
WINAPI
IUnknown_fnAddRef
(
IUnknown
*
iface
)
{
IGenericSFImpl
*
This
=
(
IGenericSFImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
-
1
);
return
++
(
This
->
ref
)
;
return
refCount
;
}
static
ULONG
WINAPI
IUnknown_fnRelease
(
IUnknown
*
iface
)
{
IGenericSFImpl
*
This
=
(
IGenericSFImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
--
(
This
->
ref
)
)
{
if
(
!
refCount
)
{
TRACE
(
"-- destroying IShellFolder(%p)
\n
"
,
This
);
if
(
This
->
pidlRoot
)
...
...
@@ -193,9 +195,8 @@ static ULONG WINAPI IUnknown_fnRelease (IUnknown * iface)
if
(
This
->
sPathTarget
)
SHFree
(
This
->
sPathTarget
);
LocalFree
((
HLOCAL
)
This
);
return
0
;
}
return
This
->
ref
;
return
refCount
;
}
static
IUnknownVtbl
unkvt
=
...
...
dlls/shell32/shfldr_mycomp.c
View file @
ba92d292
...
...
@@ -160,26 +160,27 @@ static HRESULT WINAPI ISF_MyComputer_fnQueryInterface (IShellFolder2 * iface, RE
static
ULONG
WINAPI
ISF_MyComputer_fnAddRef
(
IShellFolder2
*
iface
)
{
IGenericSFImpl
*
This
=
(
IGenericSFImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
-
1
);
return
++
(
This
->
ref
)
;
return
refCount
;
}
static
ULONG
WINAPI
ISF_MyComputer_fnRelease
(
IShellFolder2
*
iface
)
{
IGenericSFImpl
*
This
=
(
IGenericSFImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
+
1
);
if
(
!
--
(
This
->
ref
)
)
{
if
(
!
refCount
)
{
TRACE
(
"-- destroying IShellFolder(%p)
\n
"
,
This
);
if
(
This
->
pidlRoot
)
SHFree
(
This
->
pidlRoot
);
LocalFree
((
HLOCAL
)
This
);
return
0
;
}
return
This
->
ref
;
return
refCount
;
}
/**************************************************************************
...
...
dlls/shell32/shlfsbind.c
View file @
ba92d292
...
...
@@ -179,22 +179,26 @@ static HRESULT WINAPI IFileSystemBindData_fnQueryInterface(IFileSystemBindData *
static
ULONG
WINAPI
IFileSystemBindData_fnAddRef
(
IFileSystemBindData
*
iface
)
{
IFileSystemBindDataImpl
*
This
=
(
IFileSystemBindDataImpl
*
)
iface
;
TRACE
(
"(%p)
\n
"
,
This
);
return
InterlockedIncrement
(
&
This
->
ref
);
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%li)
\n
"
,
This
,
refCount
-
1
);
return
refCount
;
}
static
ULONG
WINAPI
IFileSystemBindData_fnRelease
(
IFileSystemBindData
*
iface
)
{
IFileSystemBindDataImpl
*
This
=
(
IFileSystemBindDataImpl
*
)
iface
;
TRACE
(
"(%p)
\n
"
,
This
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%li)
\n
"
,
This
,
refCount
+
1
);
if
(
!
InterlockedDecrement
(
&
This
->
ref
)
)
if
(
!
refCount
)
{
TRACE
(
" destroying ISFBindPidl(%p)
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
0
;
}
return
This
->
ref
;
return
refCount
;
}
static
HRESULT
WINAPI
IFileSystemBindData_fnGetFindData
(
IFileSystemBindData
*
iface
,
WIN32_FIND_DATAW
*
pfd
)
...
...
dlls/shell32/shlview.c
View file @
ba92d292
...
...
@@ -1636,10 +1636,11 @@ static HRESULT WINAPI IShellView_fnQueryInterface(IShellView * iface,REFIID riid
static
ULONG
WINAPI
IShellView_fnAddRef
(
IShellView
*
iface
)
{
IShellViewImpl
*
This
=
(
IShellViewImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
-
1
);
return
++
(
This
->
ref
)
;
return
refCount
;
}
/**********************************************************
* IShellView_Release
...
...
@@ -1647,10 +1648,11 @@ static ULONG WINAPI IShellView_fnAddRef(IShellView * iface)
static
ULONG
WINAPI
IShellView_fnRelease
(
IShellView
*
iface
)
{
IShellViewImpl
*
This
=
(
IShellViewImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(
)
\n
"
,
This
);
TRACE
(
"(%p)->(
count=%li)
\n
"
,
This
,
refCount
+
1
);
if
(
!
--
(
This
->
ref
)
)
if
(
!
refCount
)
{
TRACE
(
" destroying IShellView(%p)
\n
"
,
This
);
...
...
@@ -1666,9 +1668,8 @@ static ULONG WINAPI IShellView_fnRelease(IShellView * iface)
SHFree
(
This
->
apidl
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
0
;
}
return
This
->
ref
;
return
refCount
;
}
/**********************************************************
...
...
dlls/shell32/shv_bg_cmenu.c
View file @
ba92d292
...
...
@@ -106,10 +106,11 @@ static HRESULT WINAPI ISVBgCm_fnQueryInterface(IContextMenu2 *iface, REFIID riid
static
ULONG
WINAPI
ISVBgCm_fnAddRef
(
IContextMenu2
*
iface
)
{
BgCmImpl
*
This
=
(
BgCmImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
-
1
);
return
++
(
This
->
ref
)
;
return
refCount
;
}
/**************************************************************************
...
...
@@ -118,10 +119,11 @@ static ULONG WINAPI ISVBgCm_fnAddRef(IContextMenu2 *iface)
static
ULONG
WINAPI
ISVBgCm_fnRelease
(
IContextMenu2
*
iface
)
{
BgCmImpl
*
This
=
(
BgCmImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(
)
\n
"
,
This
);
TRACE
(
"(%p)->(
count=%li)
\n
"
,
This
,
refCount
+
1
);
if
(
!
--
(
This
->
ref
)
)
if
(
!
refCount
)
{
TRACE
(
" destroying IContextMenu(%p)
\n
"
,
This
);
...
...
@@ -129,10 +131,8 @@ static ULONG WINAPI ISVBgCm_fnRelease(IContextMenu2 *iface)
IShellFolder_Release
(
This
->
pSFParent
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
0
;
}
return
This
->
ref
;
return
refCount
;
}
/**************************************************************************
...
...
dlls/shell32/shv_item_cmenu.c
View file @
ba92d292
...
...
@@ -142,10 +142,11 @@ static HRESULT WINAPI ISvItemCm_fnQueryInterface(IContextMenu2 *iface, REFIID ri
static
ULONG
WINAPI
ISvItemCm_fnAddRef
(
IContextMenu2
*
iface
)
{
ItemCmImpl
*
This
=
(
ItemCmImpl
*
)
iface
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
This
->
ref
);
TRACE
(
"(%p)->(count=%lu)
\n
"
,
This
,
refCount
-
1
);
return
++
(
This
->
ref
)
;
return
refCount
;
}
/**************************************************************************
...
...
@@ -154,10 +155,11 @@ static ULONG WINAPI ISvItemCm_fnAddRef(IContextMenu2 *iface)
static
ULONG
WINAPI
ISvItemCm_fnRelease
(
IContextMenu2
*
iface
)
{
ItemCmImpl
*
This
=
(
ItemCmImpl
*
)
iface
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(
)
\n
"
,
This
);
TRACE
(
"(%p)->(
count=%li)
\n
"
,
This
,
refCount
+
1
);
if
(
!
--
(
This
->
ref
)
)
if
(
!
refCount
)
{
TRACE
(
" destroying IContextMenu(%p)
\n
"
,
This
);
...
...
@@ -171,9 +173,8 @@ static ULONG WINAPI ISvItemCm_fnRelease(IContextMenu2 *iface)
_ILFreeaPidl
(
This
->
apidl
,
This
->
cidl
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
0
;
}
return
This
->
ref
;
return
refCount
;
}
/**************************************************************************
...
...
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