dummy180
Guest
|
Posted:
Mon Oct 18, 2004 2:35 pm Post subject:
how can i get the path of the selected media file??? |
|
|
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);
}
}
|
|
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??? |
|
|
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);
}
} |
|
|