-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathpluginmain.cpp
60 lines (39 loc) · 1.21 KB
/
pluginmain.cpp
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include "pluginmain.h"
#include "Tracing.h"
using namespace std;
//Plugin handle
int pluginHandle;
//GUI window handle
HWND hwndDlg;
//plugin menu handle
int hMenu;
//Called once on plugin loading event
DLL_EXPORT bool pluginit(PLUG_INITSTRUCT* initStruct)
{
_plugin_logprintf("[Ktracer] pluginHandle: %d : event %s \n", pluginHandle, "pluginit");
initStruct->pluginVersion = plugin_version;
initStruct->sdkVersion = PLUG_SDKVERSION;
strcpy(initStruct->pluginName, plugin_name);
pluginHandle = initStruct->pluginHandle;
testInit(initStruct);
return true;
}
//Called when plugin is stopped ?
DLL_EXPORT bool plugstop()
{
_plugin_logprintf("[Ktracer] pluginHandle: %d : event %s \n", pluginHandle, "plugstop");
testStop();
return true;
}
//Called after the init event
DLL_EXPORT void plugsetup(PLUG_SETUPSTRUCT* setupStruct)
{
_plugin_logprintf("[Ktracer] pluginHandle: %d : event %s \n", pluginHandle, "plugsetup");
hwndDlg = setupStruct->hwndDlg;
hMenu = setupStruct->hMenu;
testSetup();
}
extern "C" DLL_EXPORT BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
return TRUE;
}