Prev Previous Post   Next Post Next
Old 18th March 2003, 16:10   #1
Kaboon's Avatar
Join Date: Jun 2000
Location: Netherlands
Posts: 2,494
Send a message via ICQ to Kaboon
Empty general purpose plug-in project.

This is what an empty general purpose plug-in for Winamp 2 (or Winamp5) should look like. Please note that the code is written in C.

#ifndef gen_empty_h
#define gen_empty_h
#include <windows.h>

typedef struct {
int version;
char *description;
int (*init)();
void (*config)();
void (*quit)();
HWND hwndParent;
HINSTANCE hDllInstance;
} winampGeneralPurposePlugin;

#define GPPHDR_VER 0x10

extern winampGeneralPurposePlugin *gen_plugins[256];
typedef winampGeneralPurposePlugin * (*winampGeneralPurposePluginGetter)();


#include <windows.h>
#include "gen_empty.h"

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

winampGeneralPurposePlugin plugin = {
"MyEmpyProject vx.x (gen_empty.dll)", // Plug-in description

int init() {
return 0;

void config() {

void quit() {

// do this to ensure the export isn't mangled if used in a CPP file
extern "C" {
__declspec(dllexport) winampGeneralPurposePlugin * winampGetGeneralPurposePlugin() {
return &plugin;

More usefull information can be found here:

The project created in Bloodshed Dev-C++ (a free IDE for the C/C++ programming language) can be downloaded here:

The project created in Visual C 6 can be downloaded here:

In case you use an other compiler just add gen_empty.c and gen_empty.h to a clean .dll workspace.

Thanks go out to bananskib, baafie, KiCHiK and parksie (R.I.P.).

11-02-2004: Fixed a small bug in the zip files.

25-01-2009: Added extern "C" for winampGetGeneralPurposePlugin() as too many people are copying C code into CPP files and wondering why the plugin fails to load.

Last updated: 25-01-2009.
Kaboon is offline  
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