mirror of
https://github.com/x64dbg/x64dbgpy.git
synced 2026-11-08 08:49:33 -10:00
44 lines
966 B
C++
44 lines
966 B
C++
#include "pluginmain.h"
|
|
#include "py.h"
|
|
|
|
int pluginHandle;
|
|
HWND hwndDlg;
|
|
int hMenu;
|
|
int hMenuDisasm;
|
|
int hMenuDump;
|
|
int hMenuStack;
|
|
|
|
DLL_EXPORT bool pluginit(PLUG_INITSTRUCT* initStruct)
|
|
{
|
|
initStruct->pluginVersion = plugin_version;
|
|
initStruct->sdkVersion = PLUG_SDKVERSION;
|
|
strcpy(initStruct->pluginName, plugin_name);
|
|
pluginHandle = initStruct->pluginHandle;
|
|
return pyInit(initStruct);
|
|
}
|
|
|
|
DLL_EXPORT bool plugstop()
|
|
{
|
|
pyStop();
|
|
return true;
|
|
}
|
|
|
|
DLL_EXPORT void plugsetup(PLUG_SETUPSTRUCT* setupStruct)
|
|
{
|
|
hwndDlg = setupStruct->hwndDlg;
|
|
hMenu = setupStruct->hMenu;
|
|
hMenuDisasm = setupStruct->hMenuDisasm;
|
|
hMenuDump = setupStruct->hMenuDump;
|
|
hMenuStack = setupStruct->hMenuStack;
|
|
pySetup();
|
|
}
|
|
|
|
BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|
{
|
|
if(fdwReason == DLL_PROCESS_ATTACH)
|
|
{
|
|
hInst = hinstDLL;
|
|
}
|
|
return TRUE;
|
|
}
|