Prev Previous Post   Next Post Next
Old 3rd August 2008, 16:37   #1
LordNeo Angelus
Junior Member
 
Join Date: Aug 2008
Posts: 3
Problems using C++

Greetings Everyone,

I have some problems creating a general plugin DLL. I use Visual Studio 2005 Professional edition and I have been able to compile and edit an 'Empty project' found here on the forums.

So when Winamp recognised my adaptation of the 'Empty Project' I decided to begin with a fresh project. I chose Win32->DLL(with Empty Project selected)->Finish and made the code almost identical to the code of the 'Empty Project'. It would compile, but sadly enough Winamp wouldn't recognize the DLL.(wouldn't show up as plugin) I used the following code:

File: gen_NA.h
code:
#include <GEN.h>


File: gen_NA.cpp
code:
#include <windows.h>
#include "gen_NA.h"

int init(void);
void config(void);
void quit(void);

winampGeneralPurposePlugin plugin = {
GPPHDR_VER,
"Neo Angelus v0.1 (gen_NA.dll)", // Plug-in description
init,
config,
quit,
};

int init() {
return 0;
}

void config() {
MessageBox(plugin.hwndParent,L"Config",L"",MB_OK);
}

void quit() {
}

__declspec(dllexport) winampGeneralPurposePlugin * winampGetGeneralPurposePlugin() {
return &plugin;
}



I couldn't figure out what was wrong, until I renamed gen_NA.cpp to gen_NA.c. I compiled and Winamp recognized the plugin.

This gave only one problem: I couldn't use my struct's any more.

Thus I wanted to ask, can I use *.cpp in my plugin? And if I can how can I fix the problem of Winamp not recognizing my DLL if I compile it with *.cpp? ...and|or...could anyone be so kind to give me a Visual Studio 2005 Project of a stripped down General plugin using *.cpp?(as all examples seem to be of older versions of VC)

I really hope someone can help me...and I am really sorry if this kind of question has been asked and ansered before, but I searched the forums and couldn't find an answer to my problem.
LordNeo Angelus 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