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
0b0985f3
Commit
0b0985f3
authored
May 25, 2012
by
Christian Costa
Committed by
Alexandre Julliard
May 25, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmusic: Cleanup DMUSIC_CreateDirectMusicImpl.
parent
a33d34b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
17 deletions
+31
-17
dmusic.c
dlls/dmusic/dmusic.c
+31
-17
No files found.
dlls/dmusic/dmusic.c
View file @
0b0985f3
...
@@ -369,23 +369,37 @@ static const IDirectMusic8Vtbl DirectMusic8_Vtbl = {
...
@@ -369,23 +369,37 @@ static const IDirectMusic8Vtbl DirectMusic8_Vtbl = {
IDirectMusic8Impl_SetExternalMasterClock
IDirectMusic8Impl_SetExternalMasterClock
};
};
/* for ClassFactory */
/* For ClassFactory */
HRESULT
WINAPI
DMUSIC_CreateDirectMusicImpl
(
LPCGUID
lpcGUID
,
LPVOID
*
ppobj
,
LPUNKNOWN
pUnkOuter
)
{
HRESULT
WINAPI
DMUSIC_CreateDirectMusicImpl
(
LPCGUID
riid
,
LPVOID
*
ret_iface
,
LPUNKNOWN
unkouter
)
IDirectMusic8Impl
*
dmusic
;
{
IDirectMusic8Impl
*
dmusic
;
HRESULT
ret
;
TRACE
(
"(%p,%p,%p)
\n
"
,
lpcGUID
,
ppobj
,
pUnkO
uter
);
TRACE
(
"(%p,%p,%p)
\n
"
,
riid
,
ret_iface
,
unko
uter
);
dmusic
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirectMusic8Impl
));
*
ret_iface
=
NULL
;
if
(
NULL
==
dmusic
)
{
*
ppobj
=
NULL
;
dmusic
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
IDirectMusic8Impl
));
return
E_OUTOFMEMORY
;
if
(
!
dmusic
)
}
return
E_OUTOFMEMORY
;
dmusic
->
IDirectMusic8_iface
.
lpVtbl
=
&
DirectMusic8_Vtbl
;
dmusic
->
ref
=
0
;
/* will be inited with QueryInterface */
dmusic
->
IDirectMusic8_iface
.
lpVtbl
=
&
DirectMusic8_Vtbl
;
dmusic
->
pMasterClock
=
NULL
;
dmusic
->
ref
=
0
;
/* Will be inited by QueryInterface */
dmusic
->
ppPorts
=
NULL
;
dmusic
->
pMasterClock
=
NULL
;
dmusic
->
nrofports
=
0
;
dmusic
->
ppPorts
=
NULL
;
DMUSIC_CreateReferenceClockImpl
(
&
IID_IReferenceClock
,
(
LPVOID
*
)
&
dmusic
->
pMasterClock
,
NULL
);
dmusic
->
nrofports
=
0
;
ret
=
DMUSIC_CreateReferenceClockImpl
(
&
IID_IReferenceClock
,
(
LPVOID
*
)
&
dmusic
->
pMasterClock
,
NULL
);
return
IDirectMusic8Impl_QueryInterface
((
LPDIRECTMUSIC8
)
dmusic
,
lpcGUID
,
ppobj
);
if
(
FAILED
(
ret
))
{
HeapFree
(
GetProcessHeap
(),
0
,
dmusic
);
return
ret
;
}
ret
=
IDirectMusic8Impl_QueryInterface
(
&
dmusic
->
IDirectMusic8_iface
,
riid
,
ret_iface
);
if
(
FAILED
(
ret
))
{
IReferenceClock_Release
(
&
dmusic
->
pMasterClock
->
IReferenceClock_iface
);
HeapFree
(
GetProcessHeap
(),
0
,
dmusic
);
return
ret
;
}
return
S_OK
;
}
}
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