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
99f3ee38
Commit
99f3ee38
authored
Feb 21, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Mar 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: Add IMMEndpoint to IMMDevice.
parent
90c30b3a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
1 deletion
+45
-1
devenum.c
dlls/mmdevapi/devenum.c
+44
-1
mmdevapi.h
dlls/mmdevapi/mmdevapi.h
+1
-0
No files found.
dlls/mmdevapi/devenum.c
View file @
99f3ee38
...
...
@@ -84,7 +84,7 @@ static const IMMDeviceEnumeratorVtbl MMDevEnumVtbl;
static
const
IMMDeviceCollectionVtbl
MMDevColVtbl
;
static
const
IMMDeviceVtbl
MMDeviceVtbl
;
static
const
IPropertyStoreVtbl
MMDevPropVtbl
;
static
const
IMMEndpointVtbl
MMEndpointVtbl
;
typedef
struct
MMDevColImpl
{
...
...
@@ -138,6 +138,7 @@ static void MMDevice_Create(WCHAR *name, GUID *id, EDataFlow flow, DWORD state,
}
lstrcpyW
(
cur
->
alname
,
name
);
cur
->
lpVtbl
=
&
MMDeviceVtbl
;
cur
->
lpEndpointVtbl
=
&
MMEndpointVtbl
;
cur
->
ref
=
0
;
InitializeCriticalSection
(
&
cur
->
crst
);
cur
->
crst
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": MMDevice.crst"
);
...
...
@@ -215,6 +216,8 @@ static HRESULT WINAPI MMDevice_QueryInterface(IMMDevice *iface, REFIID riid, voi
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IMMDevice
))
*
ppv
=
This
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IMMEndpoint
))
*
ppv
=
&
This
->
lpEndpointVtbl
;
if
(
*
ppv
)
{
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
...
...
@@ -303,6 +306,46 @@ static const IMMDeviceVtbl MMDeviceVtbl =
MMDevice_GetState
};
static
MMDevice
*
get_this_from_endpoint
(
IMMEndpoint
*
iface
)
{
return
(
MMDevice
*
)((
char
*
)
iface
-
offsetof
(
MMDevice
,
lpEndpointVtbl
));
}
static
HRESULT
WINAPI
MMEndpoint_QueryInterface
(
IMMEndpoint
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
MMDevice
*
This
=
get_this_from_endpoint
(
iface
);
return
IMMDevice_QueryInterface
((
IMMDevice
*
)
This
,
riid
,
ppv
);
}
static
ULONG
WINAPI
MMEndpoint_AddRef
(
IMMEndpoint
*
iface
)
{
MMDevice
*
This
=
get_this_from_endpoint
(
iface
);
return
IMMDevice_AddRef
((
IMMDevice
*
)
This
);
}
static
ULONG
WINAPI
MMEndpoint_Release
(
IMMEndpoint
*
iface
)
{
MMDevice
*
This
=
get_this_from_endpoint
(
iface
);
return
IMMDevice_Release
((
IMMDevice
*
)
This
);
}
static
HRESULT
WINAPI
MMEndpoint_GetDataFlow
(
IMMEndpoint
*
iface
,
EDataFlow
*
flow
)
{
MMDevice
*
This
=
get_this_from_endpoint
(
iface
);
if
(
!
flow
)
return
E_POINTER
;
*
flow
=
This
->
flow
;
return
S_OK
;
}
static
const
IMMEndpointVtbl
MMEndpointVtbl
=
{
MMEndpoint_QueryInterface
,
MMEndpoint_AddRef
,
MMEndpoint_Release
,
MMEndpoint_GetDataFlow
};
static
HRESULT
MMDevCol_Create
(
IMMDeviceCollection
**
ppv
,
EDataFlow
flow
,
DWORD
state
)
{
MMDevColImpl
*
This
;
...
...
dlls/mmdevapi/mmdevapi.h
View file @
99f3ee38
...
...
@@ -24,6 +24,7 @@ extern HRESULT MMDevice_SetPropValue(const GUID *devguid, DWORD flow, REFPROPERT
typedef
struct
MMDevice
{
const
IMMDeviceVtbl
*
lpVtbl
;
const
IMMEndpointVtbl
*
lpEndpointVtbl
;
LONG
ref
;
CRITICAL_SECTION
crst
;
...
...
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