how can i get the path of the selected media file???
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 can i get the path of the selected media file???

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





Posted: Mon Oct 18, 2004 2:35 pm    Post subject: how can i get the path of the selected media file??? Reply with quote

hi,

i try to develop a plugin for the wmp. for a small introduction i wrote the
"CSearch" example out of the msdn library. now i want that the path of the
selected media file is shown in a messagebox. how can i realize that ??? (i
would be glad about a small example code)

this is the function where i want to realize it:

void LaunchPage(IWMPMedia *pMedia)
{
USES_CONVERSION;
HRESULT hr;
CComBSTR bstrType;
CComBSTR bstrArtist;

//get the name of the artist
bstrType=_T("artist");
hr=pMedia->getItemInfo(bstrType,&bstrArtist);
if (SUCCEEDED(hr))
{
//create the search url
TCHAR szSearch[MAX_PATH]
_stprintf(szSearch,_T("http://search.msn.com/results.asp?q=%s"),OLE2T(bstrArtist));
CComBSTR bstrURL=szSearch;

//launch the search page
m_pPlugin->m_spCore->launchURL(bstrURL);
}
else
{
MessageBox(_T("Failed to get artist information from
media!!!"),_T("Warn"),MB_OK|MB_ICONWARNING);
}

}

Back to top
Jim Travis [ms]
Guest





Posted: Tue Oct 19, 2004 7:44 am    Post subject: Re: how can i get the path of the selected media file??? Reply with quote

http://msdn.microsoft.com/library/en-us/wmplay10/mmp_sdk/iwmpmediaget_sourceurl.asp


--
Jim Travis
Microsoft Corp.
Windows Media Player SDK

Download:
http://msdn.microsoft.com/library/default.asp?url=/downloads/list/winmedia.asp

Latest online:
http://msdn.microsoft.com/library/en-us/wmplay10/mmp_sdk/windowsmediaplayer10sdk.asp

Please do not send email directly to this alias as this alias is for
newsgroup purposes only. This posting is provided "AS IS" with no
warranties, and confers no rights. You assume all risk for your use. © 2004
Microsoft Corporation. All rights reserved.

"dummy180" <dummy180@discussions.microsoft.com> wrote in message
news:907C7691-0039-42F2-8FE3-A3154EF609DA@microsoft.com...
Quote:
hi,

i try to develop a plugin for the wmp. for a small introduction i wrote
the
"CSearch" example out of the msdn library. now i want that the path of the
selected media file is shown in a messagebox. how can i realize that ???
(i
would be glad about a small example code)

this is the function where i want to realize it:

void LaunchPage(IWMPMedia *pMedia)
{
USES_CONVERSION;
HRESULT hr;
CComBSTR bstrType;
CComBSTR bstrArtist;

//get the name of the artist
bstrType=_T("artist");
hr=pMedia->getItemInfo(bstrType,&bstrArtist);
if (SUCCEEDED(hr))
{
//create the search url
TCHAR szSearch[MAX_PATH];
_stprintf(szSearch,_T("http://search.msn.com/results.asp?q=%s"),OLE2T(bstrArtist));
CComBSTR bstrURL=szSearch;

//launch the search page
m_pPlugin->m_spCore->launchURL(bstrURL);
}
else
{
MessageBox(_T("Failed to get artist information from
media!!!"),_T("Warn"),MB_OK|MB_ICONWARNING);
}

}
Back to top
 
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