summaryrefslogtreecommitdiffstats
path: root/Src/devices/plugin.cpp
blob: 60c4e0df1c28c1bc32a76495b314471aefd9fae7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "main.h"
#include "./plugin.h"
#include "./component.h"

static HINSTANCE pluginInstance = NULL;
static DevicesComponent component;

HINSTANCE 
Plugin_GetInstance()
{
	return pluginInstance;
}

extern "C" __declspec(dllexport) ifc_wa5component *
GetWinamp5SystemComponent()
{
	return &component;
}


BOOL APIENTRY 
DllMain(HANDLE hModule, DWORD  uReason, void *reserved)
{
    switch(uReason) 
	{
		case DLL_PROCESS_ATTACH:
			pluginInstance = (HINSTANCE)hModule;
			break;
    }
    return TRUE;
}