本文整理汇总了C++中IWMPMedia::get_sourceURL方法的典型用法代码示例。如果您正苦于以下问题:C++ IWMPMedia::get_sourceURL方法的具体用法?C++ IWMPMedia::get_sourceURL怎么用?C++ IWMPMedia::get_sourceURL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IWMPMedia
的用法示例。
在下文中一共展示了IWMPMedia::get_sourceURL方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetCurrentSongFileName
CStdString CWmp_scrobbler::GetCurrentSongFileName()
{
USES_CONVERSION;
CStdString strSong;
IWMPMedia* pMedia = NULL;
BSTR bstrSong;
if(m_spCore)
{
m_spCore->get_currentMedia(&pMedia);
if(pMedia != NULL)
{
pMedia->get_sourceURL(&bstrSong);
char buf[1000];
EncodingUtils::UnicodeToUtf8(
bstrSong, -1,
buf, 999);
strSong = buf;
}
}
return strSong;
}
示例2: lsm
void CWmp2mirc::OnPlay()
{
// if we are locked (property page could be doing stuff, or the timer proc), then just ignore the request.
if(!m_cs.TryEnter())
{
LibCC::g_pLog->Message(_T("WMircP is busy; ignoring the play event."));
return;
}
IWMPMedia* pMedia = 0;
m_spCore->get_currentMedia(&pMedia);
if(!pMedia)
{
LibCC::g_pLog->Message(_T("WMircP could not get a pointer to the current media."));
}
else
{
CComBSTR url;
pMedia->get_sourceURL(&url);
LibCC::LogScopeMessage lsm(LibCC::Format("OnPlay %").qs((BSTR)url).Str());
m.OnPlay(pMedia, (PCWSTR)url);
pMedia->Release();
}
m_cs.Leave();
}