简体   繁体   English

访问Windows Media Player库C#

[英]Access the Windows Media Player library C#

I am trying to find out how to access the Windows Media Player library in c#. 我试图找出如何在c#中访问Windows Media Player库。 I have had a look around the web and SO and have found many articles on controlling WMP. 我浏览了Web和SO,发现了许多有关控制WMP的文章。 I am trying to access its library information however. 我正在尝试访问其图书馆信息。 Ie 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 谢谢,本

Create a windows form and place a WMP component on it, named WMPLayer : 创建一个Windows窗体,并在其上放置一个名为WMPLayer的WMP组件:

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. getByAttribte填写不同的参数以获取所需的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM