Ben Trengrove
Ben Trengrove

Reputation: 8759

Access the Windows Media Player library C#

I am trying to find out how to access the Windows Media Player library in c#. I have had a look around the web and SO and have found many articles on controlling WMP. I am trying to access its library information however. I.e. its track names, file path and metadata.

Is there a library for this or at least does it store it in some form of database somewhere?

Thanks, Ben

Upvotes: 1

Views: 2302

Answers (1)

cigar huang
cigar huang

Reputation: 182

Create a windows form and place a WMP component on it, named WMPLayer:

AxWMPLib.AxWindowsMediaPlayer Player = form.WMPlayer;
WMPLib.IWMPPlaylist mediaPlaylist = Player.mediaCollection.getByAttribute("MediaType", "audio"); //Get the audio medias.

Fill in different parameters in getByAttribte to get what you want.

Upvotes: 3

Related Questions