How to get album art using WMPSDK10 and VS2003.
WMPTalk.com Forum Index WMPTalk.com
Discuss Windows Media Player
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web wmptalk.com
How to get album art using WMPSDK10 and VS2003.

 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> SDK
Author Message
Juliano



Joined: 09 Jun 2006
Posts: 2

Posted: Mon Jun 12, 2006 12:33 pm    Post subject: How to get album art using WMPSDK10 and VS2003. Reply with quote

I've been unable to get the album art using VC++ (VS2003) and the sample "RemoteSkin" which comes along with the WMPSDK10.

When I try the code below:

CComPtr<IWMPPlayer4> m_spPlayer;
/* Correctly initialized in another place of the program */

CComPtr<IWMPMedia3> l_mediaFile;
m_spPlayer->get_currentMedia(&l_mediaFile);


I got
"error C2664: 'IWMPCore::get_currentMedia' : cannot convert parameter 1 from 'IWMPMedia3 ** ' to 'IWMPMedia ** '"

I appreciate any help.
Thanks in advance.

Back to top
View user's profile Send private message
SimpleSimon



Joined: 05 Jan 2005
Posts: 8

Posted: Thu Jun 15, 2006 7:53 pm    Post subject: Reply with quote

Have you tried taking the '3' off?

CComPtr<IWMPMedia> l_mediaFile;
m_spPlayer->get_currentMedia(&l_mediaFile);

If you really need an IWMPMedia3 interface you can query one from an IWMPMedia interface at a later time, I bet.
Back to top
View user's profile Send private message
Juliano



Joined: 09 Jun 2006
Posts: 2

Posted: Fri Jun 16, 2006 11:27 am    Post subject: Reply with quote

Yes, actually I'm able to get IWMPMedia but the method getItemInfoByType, which I need to get the albumArt path, belongs to IWMPMedia3.

So far I have this piece of code:

CComPtr<IWMPMedia3> l_mediaFile;
CComPtr<IWMPMetadataPicture> albumArt;

if(this->m_spPlayer.p)
{
CComBSTR str;
this->m_spPlayer->get_currentMedia((IWMPMedia**)&l_mediaFile);
if(l_mediaFile.p)
{
BSTR str;
l_mediaFile->getItemInfoByType( L"WM/Picture", NULL, 0,(VARIANT*)&albumArt);

if(albumArt.p)
{
//Never reaching this point
albumArt->get_URL(&str);
}
}
}

Any clue, why I'm not being able to get the handler of the IWMPMetadataPicture interface?

Thanks a lot for any help.

Back to top
View user's profile Send private message
 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> SDK All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Microsoft Office Forum New Topics
Powered by phpBB