summaryrefslogtreecommitdiff
path: root/core/plugin.h
blob: c84ea0be361d1f909dbc8adc3275b15035af84a3 (plain)
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
32
33
#ifndef PLUGIN_H
#define PLUGIN_H

#include <list>


typedef PLUGININFO * (__cdecl * SetPluginInfo) ();
typedef int (__cdecl * Load) (PLUGINLINK *link);
typedef int (__cdecl * OnModulesLoaded) ();
typedef int (__cdecl * Unload) ();

class plugin 
{
public:
	struct exported_funcs_s
	{
		SetPluginInfo info;
		Load load;
		OnModulesLoaded loaded;
		Unload unload;
	};
	const HMODULE getHmodule();
	const exported_funcs_s getFuncs();
	PLUGININFO *getPluginInfo();
	int setHandle(const HMODULE &hMod);
	plugin(const HMODULE hModule, const exported_funcs_s fnct, PLUGININFO *info);
	~plugin();
private:
	HMODULE hModule;
	exported_funcs_s funcs;
	PLUGININFO *pluginInfo;
};
#endif