Winamp lets you add several kind of plugins, such as general purpose plugins. Since it doesn't know anything about .NET, I decided to write a proxy using C++/CLI (initially I did this using Managed C++). The result is a proxy DLL that will sit between a managed plugin (written in C#/VB.NET/etc) and Winamp. The proxy will simply delegate all calls from Winamp to the managed plugin.

To demonstrate the proxy, I've written a WinampAlarm plugin (source/binary included in the download). It's a basic plugin written in C# and is loaded by the proxy (which is possible due to a strict naming convention of the DLL's).

Usage:
Download the zip and move the gen_*.dll's to your Winamp's plugin directory.

Downloads:

I just wanted to let you know this is a great piece of code!

I was looking for a way to start working with Winamp from C# and of course your proxy is the perfect starting point for it!!

And of course I wanted to drop here a big THANK YOU!

I will have to look deeper on how to control the media library and how to get information from the file that is currently playing, how to load and save a playlist and things like that, but at least now I know where to start and how to use it.

I'll let you know if I ever come up with something which may be interesting to show up.

Again thanks, and keep up the good work. We need more stuff like this in the .NET world.
Thank you for putting this up.

There is a small design flaw in your implementation.
Your proxy finds winamp's main window handle by FindWindow(classname).
This might fail with multiple instances, or with winamp's option to load with different class names determined by commandline.

After winamp requests the NativePluginInfo struct, it sets it's
window handle value in hwndParent member. This is then valid on
the successive init() call.

Again thanks
Your message will be encoded/formatted when it is displayed. If you want to post code, please put the code inside [code=X][/code] tags, where X is the language of your code (C#, ASPX, SQL, etc).
Name:
Email:
(will be encoded using JavaScript to keep it functional and prevent it from being picked up by spammers)
Url:
 
Message:
3 + 3 =