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
fd757e6b
Commit
fd757e6b
authored
Apr 21, 2023
by
Zebediah Figura
Committed by
Alexandre Julliard
May 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi/tests: Remove some unnecessary workarounds.
parent
1ea5d470
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
19 deletions
+7
-19
propstore.c
dlls/mmdevapi/tests/propstore.c
+7
-19
No files found.
dlls/mmdevapi/tests/propstore.c
View file @
fd757e6b
...
...
@@ -47,12 +47,9 @@ static void test_propertystore(IPropertyStore *store)
hr
=
IPropertyStore_GetValue
(
store
,
&
PKEY_AudioEndpoint_GUID
,
&
pv
);
ok
(
hr
==
S_OK
,
"Failed with %08lx
\n
"
,
hr
);
ok
(
pv
.
vt
==
VT_LPWSTR
,
"Value should be %i, is %i
\n
"
,
VT_LPWSTR
,
pv
.
vt
);
if
(
hr
==
S_OK
&&
pv
.
vt
==
VT_LPWSTR
)
{
WideCharToMultiByte
(
CP_ACP
,
0
,
pv
.
pwszVal
,
-
1
,
temp
,
sizeof
(
temp
)
-
1
,
NULL
,
NULL
);
trace
(
"guid: %s
\n
"
,
temp
);
PropVariantClear
(
&
pv
);
}
pv
.
vt
=
VT_EMPTY
;
hr
=
IPropertyStore_GetValue
(
store
,
(
const
PROPERTYKEY
*
)
&
DEVPKEY_DeviceInterface_FriendlyName
,
&
pv
);
...
...
@@ -204,33 +201,25 @@ START_TEST(propstore)
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
);
hr
=
CoCreateInstance
(
&
CLSID_MMDeviceEnumerator
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IMMDeviceEnumerator
,
(
void
**
)
&
mme
);
if
(
FAILED
(
hr
))
{
skip
(
"mmdevapi not available: 0x%08lx
\n
"
,
hr
);
goto
cleanup
;
}
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IMMDeviceEnumerator_GetDefaultAudioEndpoint
(
mme
,
eRender
,
eMultimedia
,
&
dev
);
ok
(
hr
==
S_OK
||
hr
==
E_NOTFOUND
,
"GetDefaultAudioEndpoint failed: 0x%08lx
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
{
if
(
hr
==
E_NOTFOUND
)
skip
(
"No sound card available
\n
"
);
else
skip
(
"GetDefaultAudioEndpoint returns 0x%08lx
\n
"
,
hr
);
goto
cleanup
;
}
store
=
NULL
;
hr
=
IMMDevice_OpenPropertyStore
(
dev
,
3
,
&
store
);
ok
(
hr
==
E_INVALIDARG
,
"Wrong hr returned: %08lx
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
/* It seems on windows returning with E_INVALIDARG doesn't
* set store to NULL, so just don't set store to non-null
* before calling this function
*/
ok
(
!
store
,
"Store set to non-NULL on failure: %p/%08lx
\n
"
,
store
,
hr
);
else
if
(
store
)
IPropertyStore_Release
(
store
);
ok
(
!
store
,
"Got unexpected store %p
\n
"
,
store
);
hr
=
IMMDevice_OpenPropertyStore
(
dev
,
STGM_READ
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Wrong hr returned: %08lx
\n
"
,
hr
);
...
...
@@ -239,18 +228,17 @@ START_TEST(propstore)
if
(
hr
==
E_ACCESSDENIED
)
hr
=
IMMDevice_OpenPropertyStore
(
dev
,
STGM_READ
,
&
store
);
ok
(
hr
==
S_OK
,
"Opening valid store returned %08lx
\n
"
,
hr
);
if
(
store
)
{
test_propertystore
(
store
);
test_deviceinterface
(
store
);
test_getat
(
store
);
if
(
is_wow64
)
test_setvalue_on_wow64
(
store
);
IPropertyStore_Release
(
store
);
}
IMMDevice_Release
(
dev
);
cleanup
:
if
(
mme
)
IMMDeviceEnumerator_Release
(
mme
);
CoUninitialize
();
}
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