diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-16 13:42:19 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-16 13:42:25 +0300 |
commit | 51f216f7e0feb67ad21387219c1b90e42b14658d (patch) | |
tree | 2ce37e615bf4f82320fe01babc37401fa4a56ca3 /src/core/stdautoaway | |
parent | 2e8582832fe56c89bb422b82e884ddaf67a8dbb3 (diff) |
Core plugins => CMPlugin
Diffstat (limited to 'src/core/stdautoaway')
-rw-r--r-- | src/core/stdautoaway/src/autoaway.cpp | 2 | ||||
-rw-r--r-- | src/core/stdautoaway/src/main.cpp | 8 | ||||
-rw-r--r-- | src/core/stdautoaway/src/stdafx.h | 11 |
3 files changed, 9 insertions, 12 deletions
diff --git a/src/core/stdautoaway/src/autoaway.cpp b/src/core/stdautoaway/src/autoaway.cpp index 3dda6e2d87..c5cf316d36 100644 --- a/src/core/stdautoaway/src/autoaway.cpp +++ b/src/core/stdautoaway/src/autoaway.cpp @@ -24,8 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h"
-#define AA_MODULE "AutoAway"
-
static int iBreakSounds = 0;
static int AutoAwaySound(WPARAM, LPARAM)
diff --git a/src/core/stdautoaway/src/main.cpp b/src/core/stdautoaway/src/main.cpp index b7138e4b1f..cae20cf28f 100644 --- a/src/core/stdautoaway/src/main.cpp +++ b/src/core/stdautoaway/src/main.cpp @@ -23,7 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., int LoadAutoAwayModule(void);
-HINSTANCE hInst;
+CMPlugin g_plugin;
int hLangpack;
PLUGININFOEX pluginInfo = {
@@ -39,12 +39,6 @@ PLUGININFOEX pluginInfo = { { 0x9f5ca736, 0x1108, 0x4872, {0xbe, 0xc3, 0x19, 0xc8, 0x4b, 0xc2, 0x14, 0x3b}}
};
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
-{
- hInst = hinstDLL;
- return TRUE;
-}
-
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
return &pluginInfo;
diff --git a/src/core/stdautoaway/src/stdafx.h b/src/core/stdautoaway/src/stdafx.h index 2f94563910..d785f0f238 100644 --- a/src/core/stdautoaway/src/stdafx.h +++ b/src/core/stdautoaway/src/stdafx.h @@ -40,9 +40,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <direct.h>
#include <malloc.h>
-#define __NO_CMPLUGIN_NEEDED
#include <win2k.h>
-
#include <m_system.h>
#include <newpluginapi.h>
#include <m_utils.h>
@@ -67,4 +65,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "../../mir_app/src/resource.h"
-extern HINSTANCE hInst;
+#define AA_MODULE "AutoAway"
+
+struct CMPlugin : public PLUGIN<CMPlugin>
+{
+ CMPlugin() :
+ PLUGIN<CMPlugin>(AA_MODULE)
+ {}
+};
|