1

I am writing a Media Centre Addin in Vb6 and it was all going good until i got to the point where i want to find the "Currently Playing song FilePath or URl"

I have spend a number of hours racking my brain to figure out a way of seeing what the "Currently Opened Files" are on a machine at any point of time.

My idea is to get all the currently opened files, and then filter the Extensions from these and find the media item that is currently playing, and get the filepath..

Does anyone know how i can do this? and what methods or classes or Librarys i should be looking at or importing In.. This one has really got me thinking.

I was looking at the WMI Windows Management controls, but cant seem to find what i am looking for.. any help would be great..

4

1 回答 1

0

我不确定您是否可以在 VB6 中执行此操作。

Media Center SDK 表明 Microsoft.MediaCenter 命名空间将公开 MediaCollection 类。此类有一个 AddItem 方法,可用于在打开歌曲(文件)时构建集合。有一个名为 IsActive 的属性,指示该特定集合是否处于活动状态(正在播放)

您将能够枚举组成集合的文件(歌曲)以查看正在播放的内容。然后在它们被释放时将它们移除。

不确定这是否有帮助。

谢谢,--博士

于 2013-03-15T19:41:40.573 回答