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
1fd94250
Commit
1fd94250
authored
Jan 24, 2005
by
James Hawkins
Committed by
Alexandre Julliard
Jan 24, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly implement DllCanUnloadNow ref counting.
parent
eae60bed
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
206 additions
and
101 deletions
+206
-101
auditiontrack.c
dlls/dmstyle/auditiontrack.c
+5
-0
chordtrack.c
dlls/dmstyle/chordtrack.c
+5
-0
commandtrack.c
dlls/dmstyle/commandtrack.c
+5
-0
dmstyle_main.c
dlls/dmstyle/dmstyle_main.c
+165
-101
dmstyle_private.h
dlls/dmstyle/dmstyle_private.h
+6
-0
motiftrack.c
dlls/dmstyle/motiftrack.c
+5
-0
mutetrack.c
dlls/dmstyle/mutetrack.c
+5
-0
style.c
dlls/dmstyle/style.c
+5
-0
styletrack.c
dlls/dmstyle/styletrack.c
+5
-0
No files found.
dlls/dmstyle/auditiontrack.c
View file @
1fd94250
...
...
@@ -55,6 +55,8 @@ ULONG WINAPI IDirectMusicAuditionTrack_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMSTYLE_LockModule
();
return
ref
;
}
...
...
@@ -67,6 +69,9 @@ ULONG WINAPI IDirectMusicAuditionTrack_IUnknown_Release (LPUNKNOWN iface) {
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMSTYLE_UnlockModule
();
return
ref
;
}
...
...
dlls/dmstyle/chordtrack.c
View file @
1fd94250
...
...
@@ -56,6 +56,8 @@ ULONG WINAPI IDirectMusicChordTrack_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMSTYLE_LockModule
();
return
ref
;
}
...
...
@@ -68,6 +70,9 @@ ULONG WINAPI IDirectMusicChordTrack_IUnknown_Release (LPUNKNOWN iface) {
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMSTYLE_UnlockModule
();
return
ref
;
}
...
...
dlls/dmstyle/commandtrack.c
View file @
1fd94250
...
...
@@ -55,6 +55,8 @@ ULONG WINAPI IDirectMusicCommandTrack_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMSTYLE_LockModule
();
return
ref
;
}
...
...
@@ -67,6 +69,9 @@ ULONG WINAPI IDirectMusicCommandTrack_IUnknown_Release (LPUNKNOWN iface) {
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMSTYLE_UnlockModule
();
return
ref
;
}
...
...
dlls/dmstyle/dmstyle_main.c
View file @
1fd94250
...
...
@@ -21,43 +21,52 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dmstyle
);
LONG
DMSTYLE_refCount
=
0
;
typedef
struct
{
/* IUnknown fields */
IClassFactoryVtbl
*
lpVtbl
;
DWORD
ref
;
}
IClassFactoryImpl
;
/******************************************************************
* DirectMusicSection ClassFactory
*/
static
HRESULT
WINAPI
SectionCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"(%p, %s, %p): stub
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
FIXME
(
"- no interface
\n\t
IID:
\t
%s
\n
"
,
debugstr_guid
(
riid
));
if
(
ppobj
==
NULL
)
return
E_POINTER
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
SectionCF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
return
InterlockedIncrement
(
&
This
->
ref
);
DMSTYLE_LockModule
();
return
2
;
/* non-heap based object */
}
static
ULONG
WINAPI
SectionCF_Release
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
/* static class, won't be freed */
return
InterlockedDecrement
(
&
This
->
ref
);
DMSTYLE_UnlockModule
()
;
return
1
;
/* non-heap based object */
}
static
HRESULT
WINAPI
SectionCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
TRACE
(
"(%p, %p, %s, %p)
\n
"
,
This
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
);
TRACE
(
"(%p, %s, %p)
\n
"
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
)
;
/* nothing here yet */
WARN
(
"(%p, %s, %p): not found
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
WARN
(
"(%s, %p): not found
\n
"
,
debugstr_dmguid
(
riid
),
ppobj
);
return
E_NOINTERFACE
;
}
static
HRESULT
WINAPI
SectionCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"(%p, %d): stub
\n
"
,
This
,
dolock
);
TRACE
(
"(%d)
\n
"
,
dolock
);
if
(
dolock
)
DMSTYLE_LockModule
();
else
DMSTYLE_UnlockModule
();
return
S_OK
;
}
...
...
@@ -69,37 +78,45 @@ static IClassFactoryVtbl SectionCF_Vtbl = {
SectionCF_LockServer
};
static
IClassFactoryImpl
Section_CF
=
{
&
SectionCF_Vtbl
,
1
};
static
IClassFactoryImpl
Section_CF
=
{
&
SectionCF_Vtbl
};
/******************************************************************
* DirectMusicStyle ClassFactory
*/
static
HRESULT
WINAPI
StyleCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"(%p, %s, %p): stub
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
FIXME
(
"- no interface
\n\t
IID:
\t
%s
\n
"
,
debugstr_guid
(
riid
));
if
(
ppobj
==
NULL
)
return
E_POINTER
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
StyleCF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
return
InterlockedIncrement
(
&
This
->
ref
);
DMSTYLE_LockModule
();
return
2
;
/* non-heap based object */
}
static
ULONG
WINAPI
StyleCF_Release
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
/* static class, won't be freed */
return
InterlockedDecrement
(
&
This
->
ref
);
DMSTYLE_UnlockModule
()
;
return
1
;
/* non-heap based object */
}
static
HRESULT
WINAPI
StyleCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
TRACE
(
"(%p, %p, %s, %p)
\n
"
,
This
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
);
TRACE
(
"(%p, %s, %p)
\n
"
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
)
;
return
DMUSIC_CreateDirectMusicStyleImpl
(
riid
,
ppobj
,
pOuter
);
}
static
HRESULT
WINAPI
StyleCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"(%p, %d): stub
\n
"
,
This
,
dolock
);
TRACE
(
"(%d)
\n
"
,
dolock
);
if
(
dolock
)
DMSTYLE_LockModule
();
else
DMSTYLE_UnlockModule
();
return
S_OK
;
}
...
...
@@ -111,37 +128,45 @@ static IClassFactoryVtbl StyleCF_Vtbl = {
StyleCF_LockServer
};
static
IClassFactoryImpl
Style_CF
=
{
&
StyleCF_Vtbl
,
1
};
static
IClassFactoryImpl
Style_CF
=
{
&
StyleCF_Vtbl
};
/******************************************************************
* DirectMusicChordTrack ClassFactory
*/
static
HRESULT
WINAPI
ChordTrackCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"(%p, %s, %p): stub
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
FIXME
(
"- no interface
\n\t
IID:
\t
%s
\n
"
,
debugstr_guid
(
riid
));
if
(
ppobj
==
NULL
)
return
E_POINTER
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
ChordTrackCF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
return
InterlockedIncrement
(
&
This
->
ref
);
DMSTYLE_LockModule
();
return
2
;
/* non-heap based object */
}
static
ULONG
WINAPI
ChordTrackCF_Release
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
/* static class, won't be freed */
return
InterlockedDecrement
(
&
This
->
ref
);
DMSTYLE_UnlockModule
()
;
return
1
;
/* non-heap based object */
}
static
HRESULT
WINAPI
ChordTrackCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
TRACE
(
"(%p, %p, %s, %p)
\n
"
,
This
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
);
TRACE
(
"(%p, %s, %p)
\n
"
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
)
;
return
DMUSIC_CreateDirectMusicChordTrack
(
riid
,
ppobj
,
pOuter
);
}
static
HRESULT
WINAPI
ChordTrackCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"(%p, %d): stub
\n
"
,
This
,
dolock
);
TRACE
(
"(%d)
\n
"
,
dolock
);
if
(
dolock
)
DMSTYLE_LockModule
();
else
DMSTYLE_UnlockModule
();
return
S_OK
;
}
...
...
@@ -153,37 +178,45 @@ static IClassFactoryVtbl ChordTrackCF_Vtbl = {
ChordTrackCF_LockServer
};
static
IClassFactoryImpl
ChordTrack_CF
=
{
&
ChordTrackCF_Vtbl
,
1
};
static
IClassFactoryImpl
ChordTrack_CF
=
{
&
ChordTrackCF_Vtbl
};
/******************************************************************
* DirectMusicCommandTrack ClassFactory
*/
static
HRESULT
WINAPI
CommandTrackCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"(%p, %s, %p): stub
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
FIXME
(
"- no interface
\n\t
IID:
\t
%s
\n
"
,
debugstr_guid
(
riid
));
if
(
ppobj
==
NULL
)
return
E_POINTER
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
CommandTrackCF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
return
InterlockedIncrement
(
&
This
->
ref
);
DMSTYLE_LockModule
();
return
2
;
/* non-heap based object */
}
static
ULONG
WINAPI
CommandTrackCF_Release
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
/* static class, won't be freed */
return
InterlockedDecrement
(
&
This
->
ref
);
DMSTYLE_UnlockModule
()
;
return
1
;
/* non-heap based object */
}
static
HRESULT
WINAPI
CommandTrackCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
TRACE
(
"(%p, %p, %s, %p)
\n
"
,
This
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
);
TRACE
(
"(%p, %s, %p)
\n
"
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
)
;
return
DMUSIC_CreateDirectMusicCommandTrack
(
riid
,
ppobj
,
pOuter
);
}
static
HRESULT
WINAPI
CommandTrackCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"(%p, %d): stub
\n
"
,
This
,
dolock
);
TRACE
(
"(%d)
\n
"
,
dolock
);
if
(
dolock
)
DMSTYLE_LockModule
();
else
DMSTYLE_UnlockModule
();
return
S_OK
;
}
...
...
@@ -195,37 +228,45 @@ static IClassFactoryVtbl CommandTrackCF_Vtbl = {
CommandTrackCF_LockServer
};
static
IClassFactoryImpl
CommandTrack_CF
=
{
&
CommandTrackCF_Vtbl
,
1
};
static
IClassFactoryImpl
CommandTrack_CF
=
{
&
CommandTrackCF_Vtbl
};
/******************************************************************
* DirectMusicStyleTrack ClassFactory
*/
static
HRESULT
WINAPI
StyleTrackCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"(%p, %s, %p): stub
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
FIXME
(
"- no interface
\n\t
IID:
\t
%s
\n
"
,
debugstr_guid
(
riid
));
if
(
ppobj
==
NULL
)
return
E_POINTER
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
StyleTrackCF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
return
InterlockedIncrement
(
&
This
->
ref
);
DMSTYLE_LockModule
();
return
2
;
/* non-heap based object */
}
static
ULONG
WINAPI
StyleTrackCF_Release
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
/* static class, won't be freed */
return
InterlockedDecrement
(
&
This
->
ref
);
DMSTYLE_UnlockModule
()
;
return
1
;
/* non-heap based object */
}
static
HRESULT
WINAPI
StyleTrackCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
TRACE
(
"(%p, %p, %s, %p)
\n
"
,
This
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
);
TRACE
(
"(%p, %s, %p)
\n
"
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
)
;
return
DMUSIC_CreateDirectMusicStyleTrack
(
riid
,
ppobj
,
pOuter
);
}
static
HRESULT
WINAPI
StyleTrackCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"(%p, %d): stub
\n
"
,
This
,
dolock
);
TRACE
(
"(%d)
\n
"
,
dolock
);
if
(
dolock
)
DMSTYLE_LockModule
();
else
DMSTYLE_UnlockModule
();
return
S_OK
;
}
...
...
@@ -237,37 +278,45 @@ static IClassFactoryVtbl StyleTrackCF_Vtbl = {
StyleTrackCF_LockServer
};
static
IClassFactoryImpl
StyleTrack_CF
=
{
&
StyleTrackCF_Vtbl
,
1
};
static
IClassFactoryImpl
StyleTrack_CF
=
{
&
StyleTrackCF_Vtbl
};
/******************************************************************
* DirectMusicMotifTrack ClassFactory
*/
static
HRESULT
WINAPI
MotifTrackCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"(%p, %s, %p): stub
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
FIXME
(
"- no interface
\n\t
IID:
\t
%s
\n
"
,
debugstr_guid
(
riid
));
if
(
ppobj
==
NULL
)
return
E_POINTER
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
MotifTrackCF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
return
InterlockedIncrement
(
&
This
->
ref
);
DMSTYLE_LockModule
();
return
2
;
/* non-heap based object */
}
static
ULONG
WINAPI
MotifTrackCF_Release
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
/* static class, won't be freed */
return
InterlockedDecrement
(
&
This
->
ref
);
DMSTYLE_UnlockModule
()
;
return
1
;
/* non-heap based object */
}
static
HRESULT
WINAPI
MotifTrackCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
TRACE
(
"(%p, %p, %s, %p)
\n
"
,
This
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
);
TRACE
(
"(%p, %s, %p)
\n
"
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
)
;
return
DMUSIC_CreateDirectMusicMotifTrack
(
riid
,
ppobj
,
pOuter
);
}
static
HRESULT
WINAPI
MotifTrackCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"(%p, %d): stub
\n
"
,
This
,
dolock
);
TRACE
(
"(%d)
\n
"
,
dolock
);
if
(
dolock
)
DMSTYLE_LockModule
();
else
DMSTYLE_UnlockModule
();
return
S_OK
;
}
...
...
@@ -279,37 +328,45 @@ static IClassFactoryVtbl MotifTrackCF_Vtbl = {
MotifTrackCF_LockServer
};
static
IClassFactoryImpl
MotifTrack_CF
=
{
&
MotifTrackCF_Vtbl
,
1
};
static
IClassFactoryImpl
MotifTrack_CF
=
{
&
MotifTrackCF_Vtbl
};
/******************************************************************
* DirectMusicAuditionTrack ClassFactory
*/
static
HRESULT
WINAPI
AuditionTrackCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"(%p, %s, %p): stub
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
FIXME
(
"- no interface
\n\t
IID:
\t
%s
\n
"
,
debugstr_guid
(
riid
));
if
(
ppobj
==
NULL
)
return
E_POINTER
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
AuditionTrackCF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
return
InterlockedIncrement
(
&
This
->
ref
);
DMSTYLE_LockModule
();
return
2
;
/* non-heap based object */
}
static
ULONG
WINAPI
AuditionTrackCF_Release
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
/* static class, won't be freed */
return
InterlockedDecrement
(
&
This
->
ref
);
DMSTYLE_UnlockModule
()
;
return
1
;
/* non-heap based object */
}
static
HRESULT
WINAPI
AuditionTrackCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
TRACE
(
"(%p, %p, %s, %p)
\n
"
,
This
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
);
TRACE
(
"(%p, %s, %p)
\n
"
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
)
;
return
DMUSIC_CreateDirectMusicAuditionTrack
(
riid
,
ppobj
,
pOuter
);
}
static
HRESULT
WINAPI
AuditionTrackCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"(%p, %d): stub
\n
"
,
This
,
dolock
);
TRACE
(
"(%d)
\n
"
,
dolock
);
if
(
dolock
)
DMSTYLE_LockModule
();
else
DMSTYLE_UnlockModule
();
return
S_OK
;
}
...
...
@@ -321,37 +378,45 @@ static IClassFactoryVtbl AuditionTrackCF_Vtbl = {
AuditionTrackCF_LockServer
};
static
IClassFactoryImpl
AuditionTrack_CF
=
{
&
AuditionTrackCF_Vtbl
,
1
};
static
IClassFactoryImpl
AuditionTrack_CF
=
{
&
AuditionTrackCF_Vtbl
};
/******************************************************************
* DirectMusicMuteTrack ClassFactory
*/
static
HRESULT
WINAPI
MuteTrackCF_QueryInterface
(
LPCLASSFACTORY
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"(%p, %s, %p): stub
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
FIXME
(
"- no interface
\n\t
IID:
\t
%s
\n
"
,
debugstr_guid
(
riid
));
if
(
ppobj
==
NULL
)
return
E_POINTER
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
MuteTrackCF_AddRef
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
return
InterlockedIncrement
(
&
This
->
ref
);
DMSTYLE_LockModule
();
return
2
;
/* non-heap based object */
}
static
ULONG
WINAPI
MuteTrackCF_Release
(
LPCLASSFACTORY
iface
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
/* static class, won't be freed */
return
InterlockedDecrement
(
&
This
->
ref
);
DMSTYLE_UnlockModule
()
;
return
1
;
/* non-heap based object */
}
static
HRESULT
WINAPI
MuteTrackCF_CreateInstance
(
LPCLASSFACTORY
iface
,
LPUNKNOWN
pOuter
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
TRACE
(
"(%p, %p, %s, %p)
\n
"
,
This
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
);
TRACE
(
"(%p, %s, %p)
\n
"
,
pOuter
,
debugstr_dmguid
(
riid
),
ppobj
)
;
return
DMUSIC_CreateDirectMusicMuteTrack
(
riid
,
ppobj
,
pOuter
);
}
static
HRESULT
WINAPI
MuteTrackCF_LockServer
(
LPCLASSFACTORY
iface
,
BOOL
dolock
)
{
IClassFactoryImpl
*
This
=
(
IClassFactoryImpl
*
)
iface
;
FIXME
(
"(%p, %d): stub
\n
"
,
This
,
dolock
);
TRACE
(
"(%d)
\n
"
,
dolock
);
if
(
dolock
)
DMSTYLE_LockModule
();
else
DMSTYLE_UnlockModule
();
return
S_OK
;
}
...
...
@@ -363,7 +428,7 @@ static IClassFactoryVtbl MuteTrackCF_Vtbl = {
MuteTrackCF_LockServer
};
static
IClassFactoryImpl
MuteTrack_CF
=
{
&
MuteTrackCF_Vtbl
,
1
};
static
IClassFactoryImpl
MuteTrack_CF
=
{
&
MuteTrackCF_Vtbl
};
/******************************************************************
* DllMain
...
...
@@ -388,8 +453,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
*
*/
HRESULT
WINAPI
DMSTYLE_DllCanUnloadNow
(
void
)
{
FIXME
(
"(void): stub
\n
"
);
return
S_FALSE
;
return
DMSTYLE_refCount
!=
0
?
S_FALSE
:
S_OK
;
}
...
...
dlls/dmstyle/dmstyle_private.h
View file @
1fd94250
...
...
@@ -539,6 +539,12 @@ extern HRESULT WINAPI IDirectMusicStyleTrack_IPersistStream_Load (LPPERSISTSTREA
extern
HRESULT
WINAPI
IDirectMusicStyleTrack_IPersistStream_Save
(
LPPERSISTSTREAM
iface
,
IStream
*
pStm
,
BOOL
fClearDirty
);
extern
HRESULT
WINAPI
IDirectMusicStyleTrack_IPersistStream_GetSizeMax
(
LPPERSISTSTREAM
iface
,
ULARGE_INTEGER
*
pcbSize
);
/**********************************************************************
* Dll lifetime tracking declaration for dmstyle.dll
*/
extern
LONG
DMSTYLE_refCount
;
static
inline
void
DMSTYLE_LockModule
()
{
InterlockedIncrement
(
&
DMSTYLE_refCount
);
}
static
inline
void
DMSTYLE_UnlockModule
()
{
InterlockedDecrement
(
&
DMSTYLE_refCount
);
}
/*****************************************************************************
* Misc.
...
...
dlls/dmstyle/motiftrack.c
View file @
1fd94250
...
...
@@ -55,6 +55,8 @@ ULONG WINAPI IDirectMusicMotifTrack_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMSTYLE_LockModule
();
return
ref
;
}
...
...
@@ -67,6 +69,9 @@ ULONG WINAPI IDirectMusicMotifTrack_IUnknown_Release (LPUNKNOWN iface) {
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMSTYLE_UnlockModule
();
return
ref
;
}
...
...
dlls/dmstyle/mutetrack.c
View file @
1fd94250
...
...
@@ -55,6 +55,8 @@ ULONG WINAPI IDirectMusicMuteTrack_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMSTYLE_LockModule
();
return
ref
;
}
...
...
@@ -67,6 +69,9 @@ ULONG WINAPI IDirectMusicMuteTrack_IUnknown_Release (LPUNKNOWN iface) {
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMSTYLE_UnlockModule
();
return
ref
;
}
...
...
dlls/dmstyle/style.c
View file @
1fd94250
...
...
@@ -63,6 +63,8 @@ ULONG WINAPI IDirectMusicStyle8Impl_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMSTYLE_LockModule
();
return
ref
;
}
...
...
@@ -75,6 +77,9 @@ ULONG WINAPI IDirectMusicStyle8Impl_IUnknown_Release (LPUNKNOWN iface) {
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMSTYLE_UnlockModule
();
return
ref
;
}
...
...
dlls/dmstyle/styletrack.c
View file @
1fd94250
...
...
@@ -55,6 +55,8 @@ ULONG WINAPI IDirectMusicStyleTrack_IUnknown_AddRef (LPUNKNOWN iface) {
TRACE
(
"(%p): AddRef from %ld
\n
"
,
This
,
ref
-
1
);
DMSTYLE_LockModule
();
return
ref
;
}
...
...
@@ -67,6 +69,9 @@ ULONG WINAPI IDirectMusicStyleTrack_IUnknown_Release (LPUNKNOWN iface) {
if
(
ref
==
0
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
DMSTYLE_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