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
be0c5268
Commit
be0c5268
authored
Sep 28, 2023
by
Mohamad Al-Jaf
Committed by
Alexandre Julliard
Oct 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.media.mediacontrol: Implement IMusicDisplayProperties::get/put_Title().
Called by Roon.
parent
ce59ba8c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
10 deletions
+19
-10
main.c
dlls/windows.media.mediacontrol/main.c
+14
-5
mediacontrol.c
dlls/windows.media.mediacontrol/tests/mediacontrol.c
+5
-5
No files found.
dlls/windows.media.mediacontrol/main.c
View file @
be0c5268
...
...
@@ -121,6 +121,8 @@ struct music_properties
{
IMusicDisplayProperties
IMusicDisplayProperties_iface
;
LONG
ref
;
HSTRING
title
;
};
static
inline
struct
music_properties
*
impl_from_IMusicDisplayProperties
(
IMusicDisplayProperties
*
iface
)
...
...
@@ -164,7 +166,11 @@ static ULONG WINAPI music_properties_Release( IMusicDisplayProperties *iface )
TRACE
(
"iface %p decreasing refcount to %lu.
\n
"
,
iface
,
ref
);
if
(
!
ref
)
free
(
impl
);
if
(
!
ref
)
{
WindowsDeleteString
(
impl
->
title
);
free
(
impl
);
}
return
ref
;
}
...
...
@@ -188,14 +194,17 @@ static HRESULT WINAPI music_properties_GetTrustLevel( IMusicDisplayProperties *i
static
HRESULT
WINAPI
music_properties_get_Title
(
IMusicDisplayProperties
*
iface
,
HSTRING
*
value
)
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
return
E_NOTIMPL
;
struct
music_properties
*
impl
=
impl_from_IMusicDisplayProperties
(
iface
);
TRACE
(
"iface %p, value %p
\n
"
,
iface
,
value
);
return
WindowsDuplicateString
(
impl
->
title
,
value
);
}
static
HRESULT
WINAPI
music_properties_put_Title
(
IMusicDisplayProperties
*
iface
,
HSTRING
value
)
{
FIXME
(
"iface %p, value %s stub!
\n
"
,
iface
,
debugstr_hstring
(
value
)
);
return
E_NOTIMPL
;
struct
music_properties
*
impl
=
impl_from_IMusicDisplayProperties
(
iface
);
TRACE
(
"iface %p, value %p
\n
"
,
iface
,
value
);
WindowsDeleteString
(
impl
->
title
);
return
WindowsDuplicateString
(
value
,
&
impl
->
title
);
}
static
HRESULT
WINAPI
music_properties_get_AlbumArtist
(
IMusicDisplayProperties
*
iface
,
HSTRING
*
value
)
...
...
dlls/windows.media.mediacontrol/tests/mediacontrol.c
View file @
be0c5268
...
...
@@ -178,17 +178,17 @@ static void test_MediaControlStatics(void)
check_interface
(
music_properties
,
&
IID_IAgileObject
);
hr
=
IMusicDisplayProperties_put_Title
(
music_properties
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
WindowsCreateStringReference
(
L"Wine"
,
wcslen
(
L"Wine"
),
&
header
,
&
str
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
IMusicDisplayProperties_put_Title
(
music_properties
,
str
);
todo_wine
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
IMusicDisplayProperties_get_Title
(
music_properties
,
&
ret_str
);
todo_wine
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
WindowsCompareStringOrdinal
(
str
,
ret_str
,
&
res
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
res
,
"got string %s.
\n
"
,
debugstr_hstring
(
ret_str
)
);
todo_wine
ok
(
str
!=
ret_str
,
"got same HSTRINGs %p, %p.
\n
"
,
str
,
ret_str
);
ok
(
!
res
,
"got string %s.
\n
"
,
debugstr_hstring
(
ret_str
)
);
ok
(
str
!=
ret_str
,
"got same HSTRINGs %p, %p.
\n
"
,
str
,
ret_str
);
WindowsDeleteString
(
str
);
WindowsDeleteString
(
ret_str
);
...
...
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