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
0994b850
Commit
0994b850
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 DllCanUnload ref counting.
parent
1727eb48
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
0 deletions
+16
-0
dmscript_main.c
dlls/dmscript/dmscript_main.c
+0
-0
dmscript_private.h
dlls/dmscript/dmscript_private.h
+6
-0
script.c
dlls/dmscript/script.c
+5
-0
scripttrack.c
dlls/dmscript/scripttrack.c
+5
-0
No files found.
dlls/dmscript/dmscript_main.c
View file @
0994b850
This diff is collapsed.
Click to expand it.
dlls/dmscript/dmscript_private.h
View file @
0994b850
...
...
@@ -170,6 +170,12 @@ extern HRESULT WINAPI IDirectMusicScriptTrack_IPersistStream_Load (LPPERSISTSTRE
extern
HRESULT
WINAPI
IDirectMusicScriptTrack_IPersistStream_Save
(
LPPERSISTSTREAM
iface
,
IStream
*
pStm
,
BOOL
fClearDirty
);
extern
HRESULT
WINAPI
IDirectMusicScriptTrack_IPersistStream_GetSizeMax
(
LPPERSISTSTREAM
iface
,
ULARGE_INTEGER
*
pcbSize
);
/**********************************************************************
* Dll lifetime tracking declaration for dmscript.dll
*/
extern
LONG
DMSCRIPT_refCount
;
static
inline
void
DMSCRIPT_LockModule
()
{
InterlockedIncrement
(
&
DMSCRIPT_refCount
);
}
static
inline
void
DMSCRIPT_UnlockModule
()
{
InterlockedDecrement
(
&
DMSCRIPT_refCount
);
}
/*****************************************************************************
* Misc.
...
...
dlls/dmscript/script.c
View file @
0994b850
...
...
@@ -67,6 +67,8 @@ ULONG WINAPI IDirectMusicScriptImpl_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMSCRIPT_LockModule
();
return
ref
;
}
...
...
@@ -83,6 +85,9 @@ ULONG WINAPI IDirectMusicScriptImpl_IUnknown_Release (LPUNKNOWN iface) {
HeapFree
(
GetProcessHeap
(),
0
,
This
->
pwzSource
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMSCRIPT_UnlockModule
();
return
ref
;
}
...
...
dlls/dmscript/scripttrack.c
View file @
0994b850
...
...
@@ -55,6 +55,8 @@ ULONG WINAPI IDirectMusicScriptTrack_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMSCRIPT_LockModule
();
return
ref
;
}
...
...
@@ -67,6 +69,9 @@ ULONG WINAPI IDirectMusicScriptTrack_IUnknown_Release (LPUNKNOWN iface) {
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMSCRIPT_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