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
afbf2894
Commit
afbf2894
authored
Mar 29, 2012
by
Christian Costa
Committed by
Alexandre Julliard
Mar 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Check return code of CoCreateInstance in Init method.
parent
7afb1290
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
performance.c
dlls/dmime/performance.c
+12
-9
No files found.
dlls/dmime/performance.c
View file @
afbf2894
...
...
@@ -238,15 +238,18 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_Init (LPDIRECTMUSICPERFORMANC
This
->
pDirectMusic
=
(
IDirectMusic8
*
)
*
ppDirectMusic
;
IDirectMusic8_AddRef
(
This
->
pDirectMusic
);
}
else
{
/* app allows the performance to initialise itself and needs a pointer to object*/
CoCreateInstance
(
&
CLSID_DirectMusic
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectMusic8
,
(
void
**
)
&
This
->
pDirectMusic
);
if
(
ppDirectMusic
)
{
*
ppDirectMusic
=
(
LPDIRECTMUSIC
)
This
->
pDirectMusic
;
IDirectMusic8_AddRef
((
LPDIRECTMUSIC8
)
*
ppDirectMusic
);
}
}
return
S_OK
;
HRESULT
hr
;
/* App enables the performance to initialize itself and needs a pointer to object */
hr
=
CoCreateInstance
(
&
CLSID_DirectMusic
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectMusic8
,
(
void
**
)
&
This
->
pDirectMusic
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
ppDirectMusic
)
{
*
ppDirectMusic
=
(
LPDIRECTMUSIC
)
This
->
pDirectMusic
;
IDirectMusic8_AddRef
((
LPDIRECTMUSIC8
)
*
ppDirectMusic
);
}
}
return
S_OK
;
}
static
HRESULT
WINAPI
IDirectMusicPerformance8Impl_PlaySegment
(
LPDIRECTMUSICPERFORMANCE8
iface
,
IDirectMusicSegment
*
pSegment
,
DWORD
dwFlags
,
__int64
i64StartTime
,
IDirectMusicSegmentState
**
ppSegmentState
)
{
...
...
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