Re: Retrieve currently playing songs' lyrics and other questions!
From: Jim Travis [ms] (jtravis_at_online.microsoft.com)
Date: 01/08/05
- Next message: Jim Travis [ms]: "Re: 10 SDK - Mystery Syntax"
- Previous message: Jonathan Benedicto: "how do net sinks work ?"
- In reply to: Windy: "Retrieve currently playing songs' lyrics and other questions!"
- Next in thread: Windy: "Re: Retrieve currently playing songs' lyrics and other questions!"
- Reply: Windy: "Re: Retrieve currently playing songs' lyrics and other questions!"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 7 Jan 2005 22:01:52 -0800
Actor and Artist are valid aliases for Author.
http://msdn.microsoft.com/library/en-us/wmplay10/mmp_sdk/authorattribute.asp
In any event, using an invalid attribute name shouldn't crash the Player, it
should just return a failure HR. Look for something else going on there.
For instance, perhaps bstrArtist is returning a NULL value and OLE2T is
throwing an exception? Just a guess...
-- 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. "Windy" <windy@smartbarxp.com> wrote in message news:%23TTEcFR9EHA.4004@tk2msftngp13.phx.gbl... > Dear Sirs, > > I'm very very new to creating windows media player (10) plugins - in fact > I started only today! Other than this newsgroup and the Microsoft SDK > documentation, there seems to be next to no information/examples about > creating said plugins. If anyone knows of any web pages I might browse > related to the subject I'd be very grateful. > > On to the main thrust of this post, I have posted below the LaunchPage > method from the SDK UI plugin example: > > 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://www.google.co.uk/search?hl=en&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); > } > } > > I'm trying to slowly make changes to this function so that I can get a > feel for the whole plugin scenario. What I'd like to do is use that method > to simply display a MessageBox with the songs Lyrics - not the artist name > as is retrieved at the mo. I changed > > bstrType = _T("artist"); > to > bstrType = _T("lyrics"); > > but this just causes the player to crash! I had a look in the attribute > reference and couldn't even find a type of type "artist"! Could someone > gently explain how I might get the desired result (My C++ isn't so hot > either, although I've been programming in other languages for years). > > Thanks for any help, > > Windy > >
- Next message: Jim Travis [ms]: "Re: 10 SDK - Mystery Syntax"
- Previous message: Jonathan Benedicto: "how do net sinks work ?"
- In reply to: Windy: "Retrieve currently playing songs' lyrics and other questions!"
- Next in thread: Windy: "Re: Retrieve currently playing songs' lyrics and other questions!"
- Reply: Windy: "Re: Retrieve currently playing songs' lyrics and other questions!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|