Remotable Windows Media Player in C#

Last August, I wrote a post talking about my efforts to create a remotable version of Windows Media Player from within C#.

It's pretty easy to use COM interop to embed an instance of the windows media player in a C# application, but there's a class of applications where you'd like to be able to control the full instance of WMP.

I got my stuff to work with a C++ shim that an acquaintance wrote for me, but it wasn't terribly elegant and made the project more complicated, and I'm by no means enough of a COM expert to consider trying to write it in C#.

Luckily, there are people who *are* experienced enough in that area to do so, and a week or so ago I got an email from Jonathan Dibble, a Microsoft Consultant who works in New York, saying that he had written this, and asking me if I was interested.

So, courtesy of Jonathan, I'm pleased to present Remoting Windows Media Player in C#.




Comments (3)

  1. zzz says:

    Amazing. Just what I’ve wanted!

  2. zzz says:

    Would be able to take those SDK files and create the wrappers? I’m not enthuastic about copying the GUIDs by hand from the SDK to .cs files. Never used SWIG though so no idea would it be able to do something like this.

  3. Chris says:

    Any idea how to get IWMPSyncDevice or IWMPSyncServices out of this? In C++ you can query the remoted Windows Media Player interface for either of the above interfaces.

    I imported the WMP COM objects in VS.NET and tried to cast an instance of RemotedWindowsMediaPlayer to WMPLib.IWMPSyncServices and it fails.

    All this is a little over my head. Basically I want to access portable devices services from C#.

Skip to main content