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
354ccf3f
Commit
354ccf3f
authored
Dec 17, 2022
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Split the segment object creation into a separate helper.
parent
2b1cfcd0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
12 deletions
+22
-12
segment.c
dlls/dmime/segment.c
+22
-12
No files found.
dlls/dmime/segment.c
View file @
354ccf3f
...
@@ -826,27 +826,37 @@ static const IPersistStreamVtbl persiststream_vtbl = {
...
@@ -826,27 +826,37 @@ static const IPersistStreamVtbl persiststream_vtbl = {
unimpl_IPersistStream_GetSizeMax
unimpl_IPersistStream_GetSizeMax
};
};
/* for ClassFactory */
IDirectMusicSegment8Impl
*
create_segment
(
void
)
HRESULT
create_dmsegment
(
REFIID
lpcGUID
,
void
**
ppobj
)
{
{
IDirectMusicSegment8Impl
*
obj
;
IDirectMusicSegment8Impl
*
obj
;
HRESULT
hr
;
if
(
!
(
obj
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
obj
))))
return
NULL
;
obj
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirectMusicSegment8Impl
));
if
(
NULL
==
obj
)
{
*
ppobj
=
NULL
;
return
E_OUTOFMEMORY
;
}
obj
->
IDirectMusicSegment8_iface
.
lpVtbl
=
&
dmsegment8_vtbl
;
obj
->
IDirectMusicSegment8_iface
.
lpVtbl
=
&
dmsegment8_vtbl
;
obj
->
ref
=
1
;
obj
->
ref
=
1
;
dmobject_init
(
&
obj
->
dmobj
,
&
CLSID_DirectMusicSegment
,
dmobject_init
(
&
obj
->
dmobj
,
&
CLSID_DirectMusicSegment
,
(
IUnknown
*
)
&
obj
->
IDirectMusicSegment8_iface
);
(
IUnknown
*
)
&
obj
->
IDirectMusicSegment8_iface
);
obj
->
dmobj
.
IDirectMusicObject_iface
.
lpVtbl
=
&
dmobject_vtbl
;
obj
->
dmobj
.
IDirectMusicObject_iface
.
lpVtbl
=
&
dmobject_vtbl
;
obj
->
dmobj
.
IPersistStream_iface
.
lpVtbl
=
&
persiststream_vtbl
;
obj
->
dmobj
.
IPersistStream_iface
.
lpVtbl
=
&
persiststream_vtbl
;
list_init
(
&
obj
->
Tracks
);
list_init
(
&
obj
->
Tracks
);
DMIME_LockModule
();
DMIME_LockModule
();
hr
=
IDirectMusicSegment8_QueryInterface
(
&
obj
->
IDirectMusicSegment8_iface
,
lpcGUID
,
ppobj
);
return
obj
;
}
/* for ClassFactory */
HRESULT
create_dmsegment
(
REFIID
guid
,
void
**
ret_iface
)
{
IDirectMusicSegment8Impl
*
obj
;
HRESULT
hr
;
if
(
!
(
obj
=
create_segment
()))
{
*
ret_iface
=
NULL
;
return
E_OUTOFMEMORY
;
}
hr
=
IDirectMusicSegment8_QueryInterface
(
&
obj
->
IDirectMusicSegment8_iface
,
guid
,
ret_iface
);
IDirectMusicSegment8_Release
(
&
obj
->
IDirectMusicSegment8_iface
);
IDirectMusicSegment8_Release
(
&
obj
->
IDirectMusicSegment8_iface
);
return
hr
;
return
hr
;
...
...
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