Old 23rd December 2010, 20:29   #1
Junior Member
Join Date: Jul 2007
Posts: 29
plugin does not load


I'm using Microsoft Visual Studio for making a Winamp plugin. There I need the library "taglib" that I've been able to compile to a DLL file on Windows these two files are included in my plugin:
#include <fileref.h>
#include <tag.h>

and the libraries tag.lib and zlib.lib are linked. I can compile the dll perfectly without errors and Winamp loads it. But when I use the first taglib command, like
TagLib::FileRef f(file);

the plugin does not load anymore. By the way, "file" is defined before:
const char* file =(char*)SendMessage(hwndParent,WM_WA_IPC,SendMessage(hwndParent,WM_WA_IPC,0,IPC_GETLISTPOS),IPC_GETPLAYLISTFILE);

The plugin does not appear in Options>Preferences>Plugins>General Purpose anymore. I have to comment the line
TagLib::FileRef f(file);
out and it works again...

Strangely, I have noticed that my plugin is loaded when I put it directly into the Winamp folder and not into the Winamp\Plugins folder...

I hope for some hints

Last edited by inspire; 23rd December 2010 at 23:02.
inspire is offline   Reply With Quote
Old 25th December 2010, 22:06   #2
Junior Member
Join Date: Jul 2007
Posts: 29
Okay, finally I've found the solution: tag.dll and zlib1.dll have to be in the Winamp folder and not in Winamp\Plugins. Well, can you change that behaviour? I only tell the Visual Studio linker to use tag.lib and zlib.lib....nothing about the dll files. Is there a linker option for that I couldn't find?
inspire is offline   Reply With Quote
Old 28th December 2010, 14:23   #3
Join Date: Sep 2003
Posts: 27,873
if you manually load the dlls and do GetProcAddress(..) on the exported functions as needed then you can override that behaviour. however that is sort of how things work with loading of dlls being based upon the winamp.exe location and not the plug-in dll location due to it being part of the winamp.exe process.

DrO is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump