Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Media Player (11+) C# Plugins

Tags:

c#

wmp

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.

like image 614
Paul Jenkins Avatar asked Jan 26 '26 22:01

Paul Jenkins


2 Answers

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/

like image 187
theahuramazda Avatar answered Jan 28 '26 13:01

theahuramazda


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?

like image 29
JaredPar Avatar answered Jan 28 '26 14:01

JaredPar