From 8a74e7495ce5ad39de4f5c25121a84d35df90c36 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 20 May 2018 15:08:48 +0300 Subject: CMPlugin to receive a reference to PLUGININFOEX --- plugins/AutoRun/src/main.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'plugins/AutoRun/src/main.cpp') diff --git a/plugins/AutoRun/src/main.cpp b/plugins/AutoRun/src/main.cpp index 0ecc048e29..73d82e990e 100644 --- a/plugins/AutoRun/src/main.cpp +++ b/plugins/AutoRun/src/main.cpp @@ -4,6 +4,8 @@ CMPlugin g_plugin; int &hLangpack(g_plugin.m_hLang); HKEY ROOT_KEY = HKEY_CURRENT_USER; +///////////////////////////////////////////////////////////////////////////////////////// + PLUGININFOEX pluginInfoEx = { sizeof(PLUGININFOEX), __PLUGIN_NAME, @@ -17,6 +19,17 @@ PLUGININFOEX pluginInfoEx = { {0xeb0465e2, 0xceee, 0x11db, {0x83, 0xef, 0xc1, 0xbf, 0x55, 0xd8, 0x95, 0x93}} }; +CMPlugin::CMPlugin() : + PLUGIN(MODULENAME, pluginInfoEx) +{} + +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) +{ + return &pluginInfoEx; +} + +///////////////////////////////////////////////////////////////////////////////////////// + void GetProfilePath(wchar_t *res, size_t resLen) { wchar_t dbname[MAX_PATH], exename[MAX_PATH]; @@ -99,7 +112,7 @@ static int AutorunOptInitialise(WPARAM wParam, LPARAM) odp.position = 100100000; odp.hInstance = g_plugin.getInst(); odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_AUTORUN); - odp.szTitle.a = ModuleName; + odp.szTitle.a = MODULENAME; odp.szGroup.a = LPGEN("Services"); odp.pfnDlgProc = DlgProcAutorunOpts; odp.flags = ODPF_BOLDGROUPS; @@ -107,11 +120,6 @@ static int AutorunOptInitialise(WPARAM wParam, LPARAM) return 0; } -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) -{ - return &pluginInfoEx; -} - extern "C" __declspec(dllexport) int Load(void) { mir_getLP(&pluginInfoEx); @@ -119,6 +127,8 @@ extern "C" __declspec(dllexport) int Load(void) return 0; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" __declspec(dllexport) int Unload(void) { return 0; -- cgit v1.2.3