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
b522dc66
Commit
b522dc66
authored
Aug 16, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Aug 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Move the QI implementation from IDirectSoundFullDuplex to IUnknown.
parent
0d33e204
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
32 deletions
+31
-32
duplex.c
dlls/dsound/duplex.c
+31
-32
No files found.
dlls/dsound/duplex.c
View file @
b522dc66
...
...
@@ -79,8 +79,30 @@ static inline IDirectSoundFullDuplexImpl *impl_from_IUnknown(IUnknown *iface)
static
HRESULT
WINAPI
IUnknownImpl_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
IDirectSoundFullDuplexImpl
*
This
=
impl_from_IUnknown
(
iface
);
TRACE
(
"(%p,%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
IDirectSoundFullDuplex_QueryInterface
(
&
This
->
IDirectSoundFullDuplex_iface
,
riid
,
ppv
);
if
(
!
ppv
)
{
WARN
(
"invalid parameter
\n
"
);
return
E_INVALIDARG
;
}
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
IUnknown_AddRef
(
&
This
->
IUnknown_iface
);
*
ppv
=
&
This
->
IUnknown_iface
;
return
S_OK
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IDirectSoundFullDuplex
))
{
IDirectSoundFullDuplex_AddRef
(
&
This
->
IDirectSoundFullDuplex_iface
);
*
ppv
=
&
This
->
IDirectSoundFullDuplex_iface
;
return
S_OK
;
}
else
if
(
This
->
ds8_unk
&&
(
IsEqualIID
(
riid
,
&
IID_IDirectSound
)
||
IsEqualIID
(
riid
,
&
IID_IDirectSound8
)))
return
IUnknown_QueryInterface
(
This
->
ds8_unk
,
riid
,
ppv
);
else
if
(
This
->
dsc8_unk
&&
IsEqualIID
(
riid
,
&
IID_IDirectSoundCapture
))
return
IUnknown_QueryInterface
(
This
->
dsc8_unk
,
riid
,
ppv
);
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
IUnknownImpl_AddRef
(
IUnknown
*
iface
)
...
...
@@ -122,6 +144,14 @@ static inline IDirectSoundFullDuplexImpl *impl_from_IDirectSoundFullDuplex(IDire
return
CONTAINING_RECORD
(
iface
,
IDirectSoundFullDuplexImpl
,
IDirectSoundFullDuplex_iface
);
}
static
HRESULT
WINAPI
IDirectSoundFullDuplexImpl_QueryInterface
(
IDirectSoundFullDuplex
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
IDirectSoundFullDuplexImpl
*
This
=
impl_from_IDirectSoundFullDuplex
(
iface
);
TRACE
(
"(%p,%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
IUnknown_QueryInterface
(
&
This
->
IUnknown_iface
,
riid
,
ppv
);
}
static
ULONG
WINAPI
IDirectSoundFullDuplexImpl_AddRef
(
IDirectSoundFullDuplex
*
iface
)
{
IDirectSoundFullDuplexImpl
*
This
=
impl_from_IDirectSoundFullDuplex
(
iface
);
...
...
@@ -134,37 +164,6 @@ static ULONG WINAPI IDirectSoundFullDuplexImpl_AddRef(IDirectSoundFullDuplex *if
return
ref
;
}
static
HRESULT
WINAPI
IDirectSoundFullDuplexImpl_QueryInterface
(
IDirectSoundFullDuplex
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
IDirectSoundFullDuplexImpl
*
This
=
impl_from_IDirectSoundFullDuplex
(
iface
);
TRACE
(
"(%p,%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
if
(
ppv
==
NULL
)
{
WARN
(
"invalid parameter
\n
"
);
return
E_INVALIDARG
;
}
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
IUnknown_AddRef
(
&
This
->
IUnknown_iface
);
*
ppv
=
&
This
->
IUnknown_iface
;
return
S_OK
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IDirectSoundFullDuplex
))
{
IDirectSoundFullDuplexImpl_AddRef
(
iface
);
*
ppv
=
&
This
->
IDirectSoundFullDuplex_iface
;
return
S_OK
;
}
else
if
(
This
->
ds8_unk
&&
(
IsEqualIID
(
riid
,
&
IID_IDirectSound
)
||
IsEqualIID
(
riid
,
&
IID_IDirectSound8
)))
{
return
IUnknown_QueryInterface
(
This
->
ds8_unk
,
riid
,
ppv
);
}
else
if
(
This
->
dsc8_unk
&&
IsEqualIID
(
riid
,
&
IID_IDirectSoundCapture
))
{
return
IUnknown_QueryInterface
(
This
->
dsc8_unk
,
riid
,
ppv
);
}
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
IDirectSoundFullDuplexImpl_Release
(
IDirectSoundFullDuplex
*
iface
)
{
IDirectSoundFullDuplexImpl
*
This
=
impl_from_IDirectSoundFullDuplex
(
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