Reputation: 993
Is it possible to create WMP11+ (well, sure, the more versions the better, but I'm only targeting Vista onwards for now) plugin in C#? All the resources I've found show it for C++, but not for C#.
I'm trying to create a plugin that interacts with WMP along the lines of Last.FM/the 'Now Playing' plugin (that is a "Background" class plugin), in that it sits in the background and does stuff, not a general app that wants to access WMP's data. The WMP Managed sample in the Windows SDK only shows the example of interacting with the WMP library/"control" from a separate application.
Upvotes: 2
Views: 5286
Reputation: 28325
The same author that you have linked to, Ianier Munoz, did also publish a C# article (broken old link) on writing Windows Media Player plugins. You can probably use something from that.
Upvotes: 1
Reputation: 441
May not be exactly what you're looking for but you can have a look at the code from this project: http://wmppluginsnet.codeplex.com/
Upvotes: 2
Reputation: 754565
I'm not terribly familiar with WMP's plugin architecture, but as long as the mechanism is COM based then yes, you can write C# plugins. COM is a language neutral method for exposing APIs. In C#, and most other .Net languages, it's possible to create COM components and hence plug into a COM architecture.
There are a few problems that come with this. Up until 2.0SP1 it was only possible to create a single version of the CLR in one process. The effect of a plugin architecture is that the first .Net plugin will set the CLR version for the process. So for example if your plugin is 1.0 based and it loads first no problem. But any subsequent plugins that want to run in the 2.0 CLR are out of luck.
Can you post some links to the samples that you are talking about?
Upvotes: 1