-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathplugin.h
More file actions
22 lines (18 loc) · 695 Bytes
/
plugin.h
File metadata and controls
22 lines (18 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once
class Plugin
{
private:
void *hModule;
void (__cdecl* func_OnInitialize)(int, void**) = 0;
void (__cdecl* func_OnPreExecute)(const char*, void*) = 0;
bool (__cdecl* func_OnDlOpen)(const char*, void**) = 0;
bool (__cdecl* func_OnDlSym)(void*, const char*, void**) = 0;
bool (__cdecl* func_OnResolveSymbol)(const char*, void**) = 0;
public:
void Initialize(const char *name);
void OnPreExecute(const char *lib_name, void *base_address);
bool OnDlOpen(const char *lib_name, void **result);
bool OnDlSym(void *handle, const char *symbol, void **result);
bool OnResolveSymbol(const char *symbol, void **result);
};
extern Plugin *g_plugin;