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
e6638bd8
Commit
e6638bd8
authored
Apr 05, 2012
by
Andrew Eikum
Committed by
Alexandre Julliard
Apr 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: Store device interface in registry.
parent
9c79ba8a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
devenum.c
dlls/mmdevapi/devenum.c
+9
-0
propstore.c
dlls/mmdevapi/tests/propstore.c
+18
-0
No files found.
dlls/mmdevapi/devenum.c
View file @
e6638bd8
...
...
@@ -268,6 +268,10 @@ static MMDevice *MMDevice_Create(WCHAR *name, GUID *id, EDataFlow flow, DWORD st
WCHAR
guidstr
[
39
];
DWORD
i
;
static
const
PROPERTYKEY
deviceinterface_key
=
{
{
0x233164c8
,
0x1b2c
,
0x4c7d
,
{
0xbc
,
0x68
,
0xb6
,
0x71
,
0x68
,
0x7a
,
0x25
,
0x67
}},
1
};
for
(
i
=
0
;
i
<
MMDevice_count
;
++
i
)
{
MMDevice
*
device
=
MMDevice_head
[
i
];
...
...
@@ -319,10 +323,15 @@ static MMDevice *MMDevice_Create(WCHAR *name, GUID *id, EDataFlow flow, DWORD st
if
(
!
RegCreateKeyExW
(
key
,
reg_properties
,
0
,
NULL
,
0
,
KEY_WRITE
|
KEY_READ
,
NULL
,
&
keyprop
,
NULL
))
{
PROPVARIANT
pv
;
pv
.
vt
=
VT_LPWSTR
;
pv
.
u
.
pwszVal
=
name
;
MMDevice_SetPropValue
(
id
,
flow
,
(
const
PROPERTYKEY
*
)
&
DEVPKEY_Device_FriendlyName
,
&
pv
);
MMDevice_SetPropValue
(
id
,
flow
,
(
const
PROPERTYKEY
*
)
&
DEVPKEY_Device_DeviceDesc
,
&
pv
);
pv
.
u
.
pwszVal
=
guidstr
;
MMDevice_SetPropValue
(
id
,
flow
,
&
deviceinterface_key
,
&
pv
);
RegCloseKey
(
keyprop
);
}
RegCloseKey
(
key
);
...
...
dlls/mmdevapi/tests/propstore.c
View file @
e6638bd8
...
...
@@ -64,6 +64,23 @@ static void test_propertystore(IPropertyStore *store)
ok
(
pv
.
vt
==
VT_EMPTY
,
"Key should not be found
\n
"
);
}
static
void
test_deviceinterface
(
IPropertyStore
*
store
)
{
HRESULT
hr
;
PROPVARIANT
pv
;
static
const
PROPERTYKEY
deviceinterface_key
=
{
{
0x233164c8
,
0x1b2c
,
0x4c7d
,
{
0xbc
,
0x68
,
0xb6
,
0x71
,
0x68
,
0x7a
,
0x25
,
0x67
}},
1
};
pv
.
vt
=
VT_EMPTY
;
hr
=
IPropertyStore_GetValue
(
store
,
&
deviceinterface_key
,
&
pv
);
ok
(
hr
==
S_OK
,
"GetValue failed: %08x
\n
"
,
hr
);
ok
(
pv
.
vt
==
VT_LPWSTR
,
"Got wrong variant type: 0x%x
\n
"
,
pv
.
vt
);
trace
(
"device interface: %s
\n
"
,
wine_dbgstr_w
(
pv
.
u
.
pwszVal
));
CoTaskMemFree
(
pv
.
u
.
pwszVal
);
}
START_TEST
(
propstore
)
{
HRESULT
hr
;
...
...
@@ -109,6 +126,7 @@ START_TEST(propstore)
if
(
store
)
{
test_propertystore
(
store
);
test_deviceinterface
(
store
);
IPropertyStore_Release
(
store
);
}
IMMDevice_Release
(
dev
);
...
...
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