How to parse a playlist file using WMPSDK
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 parse a playlist file using WMPSDK

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





Posted: Thu Sep 16, 2004 8:01 pm    Post subject: How to parse a playlist file using WMPSDK Reply with quote

I need get all media files' path in a playlist file, such as
c:\PlaylistName.m3u (or PlaylistName.wpl, playlistName.asx etc.), how to do
it? Thanks in advance!

========================================================
std::vector<std::string> sMediaFiles;

CComPtr<IWMPPlaylist> spPlaylist;
string strPlaylist = _T("c:\\PlaylistName.m3u ");

// How to get the sPlaylist object from strPlaylist
??? ??? ???

long lCount = 0;
spPlaylist->get_count(&lCount);
for (int i = 0; i < lCount; i++)
{
CComPtr<IWMPMedia> spWMMedia;
spPlaylist->get_item(i, &spWMMedia);
BSTR bsPath;
spWMMedia->get_sourceURL(bsPath);
string sPath = W2A(bsPath);

sMediaFiles.push_back(sPath);
sysFreeString(bsPath);
}
========================================================

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