i was randomly looking at the gen_tray example in the SDK, and i cam accross this:
lpWndProcOld = (WNDPROC)SetWindowLong(plugin.hwndParent,GWL_WNDPROC,(LONG)WndProc);
and then i looked in the quit function, and the subclassing wasnt released.
i found this when working with an application other than winamp that loads winamp's gen plugins. in their implentation, the plugins are unloaded before the window is destroyed, but since the window is still technically subclassed after the plugin is unloaded and before the window is destroyed, any messages sent to the window at this point are trying to be sent to this unloaded plugin, and therefor crashes.
if we delete the window before unloading the plugins, i asumed this could cause other issues, such as a plugin that may save the current state of the player. that, and also, this prevents plugins from being loaded and unloaded on the fly.
i can fix the plugin in the local copy, but it would be nice to see the SDK updated as well.