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
daf7fb1f
Commit
daf7fb1f
authored
Jan 12, 2014
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmscript: COM cleanup for IPersistStream from DirectMusicScriptTrack.
parent
a0c0e367
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
scripttrack.c
dlls/dmscript/scripttrack.c
+13
-8
No files found.
dlls/dmscript/scripttrack.c
View file @
daf7fb1f
...
...
@@ -28,7 +28,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmscript);
typedef
struct
DirectMusicScriptTrack
{
const
IUnknownVtbl
*
UnknownVtbl
;
IDirectMusicTrack8
IDirectMusicTrack8_iface
;
const
IPersistStreamVtbl
*
PersistStreamVtbl
;
IPersistStream
IPersistStream_iface
;
LONG
ref
;
LPDMUS_OBJECTDESC
pDesc
;
}
DirectMusicScriptTrack
;
...
...
@@ -40,6 +40,11 @@ static inline DirectMusicScriptTrack *impl_from_IDirectMusicTrack8(IDirectMusicT
return
CONTAINING_RECORD
(
iface
,
DirectMusicScriptTrack
,
IDirectMusicTrack8_iface
);
}
static
inline
DirectMusicScriptTrack
*
impl_from_IPersistStream
(
IPersistStream
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
DirectMusicScriptTrack
,
IPersistStream_iface
);
}
/* IDirectMusicScriptTrack IUnknown part: */
static
HRESULT
WINAPI
IDirectMusicScriptTrack_IUnknown_QueryInterface
(
LPUNKNOWN
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
{
ICOM_THIS_MULTI
(
IDirectMusicScriptTrack
,
UnknownVtbl
,
iface
);
...
...
@@ -55,8 +60,8 @@ static HRESULT WINAPI IDirectMusicScriptTrack_IUnknown_QueryInterface (LPUNKNOWN
IDirectMusicTrack_AddRef
(
&
This
->
IDirectMusicTrack8_iface
);
return
S_OK
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IPersistStream
))
{
*
ppobj
=
&
This
->
PersistStreamVtbl
;
IPersistStream_AddRef
((
LPPERSISTSTREAM
)
&
This
->
PersistStreamVtbl
);
*
ppobj
=
&
This
->
IPersistStream_iface
;
IPersistStream_AddRef
(
&
This
->
IPersistStream_iface
);
return
S_OK
;
}
...
...
@@ -271,19 +276,19 @@ static const IDirectMusicTrack8Vtbl dmtrack8_vtbl = {
static
HRESULT
WINAPI
IPersistStreamImpl_QueryInterface
(
IPersistStream
*
iface
,
REFIID
riid
,
void
**
ppobj
)
{
ICOM_THIS_MULTI
(
IDirectMusicScriptTrack
,
PersistStreamVtbl
,
iface
);
DirectMusicScriptTrack
*
This
=
impl_from_IPersistStream
(
iface
);
return
IDirectMusicScriptTrack_IUnknown_QueryInterface
((
LPUNKNOWN
)
&
This
->
UnknownVtbl
,
riid
,
ppobj
);
}
static
ULONG
WINAPI
IPersistStreamImpl_AddRef
(
IPersistStream
*
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicScriptTrack
,
PersistStreamVtbl
,
iface
);
DirectMusicScriptTrack
*
This
=
impl_from_IPersistStream
(
iface
);
return
IDirectMusicScriptTrack_IUnknown_AddRef
((
LPUNKNOWN
)
&
This
->
UnknownVtbl
);
}
static
ULONG
WINAPI
IPersistStreamImpl_Release
(
IPersistStream
*
iface
)
{
ICOM_THIS_MULTI
(
IDirectMusicScriptTrack
,
PersistStreamVtbl
,
iface
);
DirectMusicScriptTrack
*
This
=
impl_from_IPersistStream
(
iface
);
return
IDirectMusicScriptTrack_IUnknown_Release
((
LPUNKNOWN
)
&
This
->
UnknownVtbl
);
}
...
...
@@ -314,7 +319,7 @@ static HRESULT WINAPI IPersistStreamImpl_GetSizeMax(IPersistStream *iface, ULARG
return
E_NOTIMPL
;
}
static
const
IPersistStreamVtbl
DirectMusicScriptTrack_PersistStream_V
tbl
=
{
static
const
IPersistStreamVtbl
persist_v
tbl
=
{
IPersistStreamImpl_QueryInterface
,
IPersistStreamImpl_AddRef
,
IPersistStreamImpl_Release
,
...
...
@@ -342,7 +347,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicScriptTrack(LPCGUID lpcGUID, void **ppobj
track
->
UnknownVtbl
=
&
DirectMusicScriptTrack_Unknown_Vtbl
;
track
->
IDirectMusicTrack8_iface
.
lpVtbl
=
&
dmtrack8_vtbl
;
track
->
PersistStreamVtbl
=
&
DirectMusicScriptTrack_PersistStream_V
tbl
;
track
->
IPersistStream_iface
.
lpVtbl
=
&
persist_v
tbl
;
track
->
pDesc
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
DMUS_OBJECTDESC
));
DM_STRUCT_INIT
(
track
->
pDesc
);
track
->
pDesc
->
dwValidData
|=
DMUS_OBJ_CLASS
;
...
...
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