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
336cc787
Commit
336cc787
authored
May 31, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 01, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: Return interface pointers instead of impl pointers.
parent
f0c50866
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
20 deletions
+21
-20
audiovolume.c
dlls/mmdevapi/audiovolume.c
+16
-15
devenum.c
dlls/mmdevapi/devenum.c
+5
-5
No files found.
dlls/mmdevapi/audiovolume.c
View file @
336cc787
...
@@ -40,8 +40,6 @@
...
@@ -40,8 +40,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mmdevapi
);
WINE_DEFAULT_DEBUG_CHANNEL
(
mmdevapi
);
static
const
IAudioEndpointVolumeExVtbl
AEVImpl_Vtbl
;
typedef
struct
AEVImpl
{
typedef
struct
AEVImpl
{
IAudioEndpointVolumeEx
IAudioEndpointVolumeEx_iface
;
IAudioEndpointVolumeEx
IAudioEndpointVolumeEx_iface
;
LONG
ref
;
LONG
ref
;
...
@@ -52,18 +50,6 @@ static inline AEVImpl *impl_from_IAudioEndpointVolumeEx(IAudioEndpointVolumeEx *
...
@@ -52,18 +50,6 @@ static inline AEVImpl *impl_from_IAudioEndpointVolumeEx(IAudioEndpointVolumeEx *
return
CONTAINING_RECORD
(
iface
,
AEVImpl
,
IAudioEndpointVolumeEx_iface
);
return
CONTAINING_RECORD
(
iface
,
AEVImpl
,
IAudioEndpointVolumeEx_iface
);
}
}
HRESULT
AudioEndpointVolume_Create
(
MMDevice
*
parent
,
IAudioEndpointVolume
**
ppv
)
{
AEVImpl
*
This
;
This
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
This
));
*
ppv
=
(
IAudioEndpointVolume
*
)
This
;
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IAudioEndpointVolumeEx_iface
.
lpVtbl
=
&
AEVImpl_Vtbl
;
This
->
ref
=
1
;
return
S_OK
;
}
static
void
AudioEndpointVolume_Destroy
(
AEVImpl
*
This
)
static
void
AudioEndpointVolume_Destroy
(
AEVImpl
*
This
)
{
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
@@ -79,7 +65,7 @@ static HRESULT WINAPI AEV_QueryInterface(IAudioEndpointVolumeEx *iface, REFIID r
...
@@ -79,7 +65,7 @@ static HRESULT WINAPI AEV_QueryInterface(IAudioEndpointVolumeEx *iface, REFIID r
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IAudioEndpointVolume
)
||
IsEqualIID
(
riid
,
&
IID_IAudioEndpointVolume
)
||
IsEqualIID
(
riid
,
&
IID_IAudioEndpointVolumeEx
))
{
IsEqualIID
(
riid
,
&
IID_IAudioEndpointVolumeEx
))
{
*
ppv
=
This
;
*
ppv
=
&
This
->
IAudioEndpointVolumeEx_iface
;
}
}
else
else
return
E_NOINTERFACE
;
return
E_NOINTERFACE
;
...
@@ -286,3 +272,18 @@ static const IAudioEndpointVolumeExVtbl AEVImpl_Vtbl = {
...
@@ -286,3 +272,18 @@ static const IAudioEndpointVolumeExVtbl AEVImpl_Vtbl = {
AEV_GetVolumeRange
,
AEV_GetVolumeRange
,
AEV_GetVolumeRangeChannel
AEV_GetVolumeRangeChannel
};
};
HRESULT
AudioEndpointVolume_Create
(
MMDevice
*
parent
,
IAudioEndpointVolume
**
ppv
)
{
AEVImpl
*
This
;
*
ppv
=
NULL
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
This
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IAudioEndpointVolumeEx_iface
.
lpVtbl
=
&
AEVImpl_Vtbl
;
This
->
ref
=
1
;
*
ppv
=
(
IAudioEndpointVolume
*
)
&
This
->
IAudioEndpointVolumeEx_iface
;
return
S_OK
;
}
dlls/mmdevapi/devenum.c
View file @
336cc787
...
@@ -551,7 +551,7 @@ static HRESULT WINAPI MMDevice_QueryInterface(IMMDevice *iface, REFIID riid, voi
...
@@ -551,7 +551,7 @@ static HRESULT WINAPI MMDevice_QueryInterface(IMMDevice *iface, REFIID riid, voi
*
ppv
=
NULL
;
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IMMDevice
))
||
IsEqualIID
(
riid
,
&
IID_IMMDevice
))
*
ppv
=
This
;
*
ppv
=
&
This
->
IMMDevice_iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IMMEndpoint
))
else
if
(
IsEqualIID
(
riid
,
&
IID_IMMEndpoint
))
*
ppv
=
&
This
->
IMMEndpoint_iface
;
*
ppv
=
&
This
->
IMMEndpoint_iface
;
if
(
*
ppv
)
if
(
*
ppv
)
...
@@ -797,7 +797,7 @@ static HRESULT WINAPI MMDevCol_QueryInterface(IMMDeviceCollection *iface, REFIID
...
@@ -797,7 +797,7 @@ static HRESULT WINAPI MMDevCol_QueryInterface(IMMDeviceCollection *iface, REFIID
return
E_POINTER
;
return
E_POINTER
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IMMDeviceCollection
))
||
IsEqualIID
(
riid
,
&
IID_IMMDeviceCollection
))
*
ppv
=
This
;
*
ppv
=
&
This
->
IMMDeviceCollection_iface
;
else
else
*
ppv
=
NULL
;
*
ppv
=
NULL
;
if
(
!*
ppv
)
if
(
!*
ppv
)
...
@@ -897,7 +897,7 @@ HRESULT MMDevEnum_Create(REFIID riid, void **ppv)
...
@@ -897,7 +897,7 @@ HRESULT MMDevEnum_Create(REFIID riid, void **ppv)
load_driver_devices
(
eRender
);
load_driver_devices
(
eRender
);
load_driver_devices
(
eCapture
);
load_driver_devices
(
eCapture
);
}
}
return
I
Unknown_QueryInterface
((
IUnknown
*
)
This
,
riid
,
ppv
);
return
I
MMDeviceEnumerator_QueryInterface
(
&
This
->
IMMDeviceEnumerator_iface
,
riid
,
ppv
);
}
}
void
MMDevEnum_Free
(
void
)
void
MMDevEnum_Free
(
void
)
...
@@ -920,7 +920,7 @@ static HRESULT WINAPI MMDevEnum_QueryInterface(IMMDeviceEnumerator *iface, REFII
...
@@ -920,7 +920,7 @@ static HRESULT WINAPI MMDevEnum_QueryInterface(IMMDeviceEnumerator *iface, REFII
return
E_POINTER
;
return
E_POINTER
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IMMDeviceEnumerator
))
||
IsEqualIID
(
riid
,
&
IID_IMMDeviceEnumerator
))
*
ppv
=
This
;
*
ppv
=
&
This
->
IMMDeviceEnumerator_iface
;
else
else
*
ppv
=
NULL
;
*
ppv
=
NULL
;
if
(
!*
ppv
)
if
(
!*
ppv
)
...
@@ -1345,7 +1345,7 @@ static HRESULT WINAPI MMDevPropStore_QueryInterface(IPropertyStore *iface, REFII
...
@@ -1345,7 +1345,7 @@ static HRESULT WINAPI MMDevPropStore_QueryInterface(IPropertyStore *iface, REFII
return
E_POINTER
;
return
E_POINTER
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IPropertyStore
))
||
IsEqualIID
(
riid
,
&
IID_IPropertyStore
))
*
ppv
=
This
;
*
ppv
=
&
This
->
IPropertyStore_iface
;
else
else
*
ppv
=
NULL
;
*
ppv
=
NULL
;
if
(
!*
ppv
)
if
(
!*
ppv
)
...
...
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