views:

168

answers:

2

I'd like to query Windows Media player from an external app to find out what track (album and artist) it's currently playing.

Is that information exposed anywhere?

+3  A: 

One way to do it would be to write a Windows Media Player plug-in. There's an API for doing this at http://msdn.microsoft.com/en-us/library/bb262326(VS.85).aspx. And some info on how to update the plugin wizard to Visual Studio 2008 here.

A background User Interface plugin could write the info you want, such as the currently playing track, title, etc., to a file that you monitor. The UI plugin is simply an object that implements IWMPPluginUI.

CLaRGe
A: 

Well one approach seems to install a "Blogging plugin", which will write the information to the registry, where you would be able to read it.

It's explained here (scroll down to the Getting Data from Media Player (and iTunes) section: http://blogs.msdn.com/coding4fun/archive/2005/04/11/407357.aspx

The Blogging plugin is available from Microsoft here, but you could also write your own plugin to gain more control and choose your desired means of communication.

driis