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
6894f384
Commit
6894f384
authored
May 11, 2012
by
Christian Costa
Committed by
Alexandre Julliard
May 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmsynth: Cleanup QueryInterface methods.
parent
91208527
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
32 deletions
+43
-32
synth.c
dlls/dmsynth/synth.c
+21
-16
synthsink.c
dlls/dmsynth/synthsink.c
+22
-16
No files found.
dlls/dmsynth/synth.c
View file @
6894f384
...
...
@@ -34,27 +34,32 @@ static inline IDirectMusicSynth8Impl *impl_from_IDirectMusicSynth8(IDirectMusicS
}
/* IDirectMusicSynth8Impl IUnknown part: */
static
HRESULT
WINAPI
IDirectMusicSynth8Impl_QueryInterface
(
LPDIRECTMUSICSYNTH8
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
static
HRESULT
WINAPI
IDirectMusicSynth8Impl_QueryInterface
(
LPDIRECTMUSICSYNTH8
iface
,
REFIID
riid
,
LPVOID
*
ret_iface
)
{
IDirectMusicSynth8Impl
*
This
=
impl_from_IDirectMusicSynth8
(
iface
);
IDirectMusicSynth8Impl
*
This
=
impl_from_IDirectMusicSynth8
(
iface
);
TRACE
(
"(%p, %s, %p)
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_dmguid
(
riid
),
ret_iface
);
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IDirectMusicSynth
)
||
IsEqualIID
(
riid
,
&
IID_IDirectMusicSynth8
))
{
IUnknown_AddRef
(
iface
);
*
ppobj
=
This
;
return
S_OK
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IKsControl
))
{
IUnknown_AddRef
(
iface
);
*
ppobj
=
&
This
->
IKsControl_iface
;
return
S_OK
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IDirectMusicSynth
)
||
IsEqualIID
(
riid
,
&
IID_IDirectMusicSynth8
))
{
IUnknown_AddRef
(
iface
);
*
ret_iface
=
iface
;
return
S_OK
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IKsControl
))
{
IUnknown_AddRef
(
iface
);
*
ret_iface
=
&
This
->
IKsControl_iface
;
return
S_OK
;
}
WARN
(
"(%p, %s, %p): not found
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
return
E_NOINTERFACE
;
*
ret_iface
=
NULL
;
WARN
(
"(%p)->(%s, %p): not found
\n
"
,
iface
,
debugstr_dmguid
(
riid
),
ret_iface
);
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
IDirectMusicSynth8Impl_AddRef
(
LPDIRECTMUSICSYNTH8
iface
)
...
...
dlls/dmsynth/synthsink.c
View file @
6894f384
...
...
@@ -30,25 +30,31 @@ static inline IDirectMusicSynthSinkImpl *impl_from_IDirectMusicSynthSink(IDirect
}
/* IDirectMusicSynthSinkImpl IUnknown part: */
static
HRESULT
WINAPI
IDirectMusicSynthSinkImpl_QueryInterface
(
LPDIRECTMUSICSYNTHSINK
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
static
HRESULT
WINAPI
IDirectMusicSynthSinkImpl_QueryInterface
(
LPDIRECTMUSICSYNTHSINK
iface
,
REFIID
riid
,
LPVOID
*
ret_iface
)
{
IDirectMusicSynthSinkImpl
*
This
=
impl_from_IDirectMusicSynthSink
(
iface
);
TRACE
(
"(%p, %s, %p)
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IDirectMusicSynthSink
))
{
IUnknown_AddRef
(
iface
);
*
ppobj
=
This
;
return
S_OK
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IKsControl
))
{
IUnknown_AddRef
(
iface
);
*
ppobj
=
&
This
->
IKsControl_iface
;
return
S_OK
;
IDirectMusicSynthSinkImpl
*
This
=
impl_from_IDirectMusicSynthSink
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
iface
,
debugstr_dmguid
(
riid
),
ret_iface
);
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IDirectMusicSynthSink
))
{
IUnknown_AddRef
(
iface
);
*
ret_iface
=
iface
;
return
S_OK
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IKsControl
))
{
IUnknown_AddRef
(
iface
);
*
ret_iface
=
&
This
->
IKsControl_iface
;
return
S_OK
;
}
*
ret_iface
=
NULL
;
WARN
(
"(%p)->(%s, %p): not found
\n
"
,
iface
,
debugstr_dmguid
(
riid
),
ret_iface
);
WARN
(
"(%p, %s, %p): not found
\n
"
,
This
,
debugstr_dmguid
(
riid
),
ppobj
);
return
E_NOINTERFACE
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
IDirectMusicSynthSinkImpl_AddRef
(
LPDIRECTMUSICSYNTHSINK
iface
)
...
...
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