summaryrefslogtreecommitdiff
path: root/plugins/AutoRun/src/main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-20 15:08:48 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-20 15:08:48 +0300
commit8a74e7495ce5ad39de4f5c25121a84d35df90c36 (patch)
tree03e5b4870f09a3163306740c2eebee47bc15b042 /plugins/AutoRun/src/main.cpp
parentc5bf7d6123dd1c3b82ccb8fdb1b068077e9d56d4 (diff)
CMPlugin to receive a reference to PLUGININFOEX
Diffstat (limited to 'plugins/AutoRun/src/main.cpp')
-rw-r--r--plugins/AutoRun/src/main.cpp22
1 files changed, 16 insertions, 6 deletions
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<CMPlugin>(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;