Winamp plugin

dnewbie run3 at myopera.com
Wed Jul 4 21:37:06 PDT 2012


I'm writing a Winamp plugin in D. Winamp loads my plugin and 
everything is fine until I close Winamp. At this point, Winamp 
calls the Quit() function of my plugin and *after* that, Winamp 
crashes.

Here is the code.

D source
http://dpaste.dzfl.pl/e2b2f886


myplugin.def - .DEF file
-------------------------------
LIBRARY "ml_myplugind.dll"
EXETYPE NT
SUBSYSTEM WINDOWS
EXPORTS
	winampGetMediaLibraryPlugin
-------------------------------

Compile:
dmd myplugin.d myplugin.def -ofml_myplugind.dll -L/IMPLIB

Copy ml_myplugind.dll to 'C:\Program Files (x86)\Winamp\Plugins'

Restart Winamp and go to Options -> Preferences -> Plugins -> 
Media Library.
You'll see 'My Cool Plugin D' [ml_myplugind.dll]' that means the 
plugin was loaded.

Close Winamp. You'll see a message box 'Quit() from D', from the 
plugin and
MS-Windows displays a error dialog. Click more information and it 
says APPCRASH module ml_myplugind.dll.

I have tried the following C code which does the same thing, and 
I've got no APPCRASHES

http://pastebin.com/7t8jkfn8

I can't see what is wrong. Any help is appreciated.

More information about Winamp plugin:
http://wiki.winamp.com/wiki/Media_Library_Plugin



More information about the Digitalmars-d-learn mailing list