summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator/Src/NewsAggregator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/NewsAggregator/Src/NewsAggregator.cpp')
-rw-r--r--plugins/NewsAggregator/Src/NewsAggregator.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/plugins/NewsAggregator/Src/NewsAggregator.cpp b/plugins/NewsAggregator/Src/NewsAggregator.cpp
index d0b1547f22..66f0af69b8 100644
--- a/plugins/NewsAggregator/Src/NewsAggregator.cpp
+++ b/plugins/NewsAggregator/Src/NewsAggregator.cpp
@@ -19,7 +19,7 @@ Boston, MA 02111-1307, USA.
#include "stdafx.h"
-HINSTANCE hInst = nullptr;
+HINSTANCE g_hInstance = nullptr;
int hLangpack;
HANDLE hPrebuildMenuHook = nullptr;
@@ -29,6 +29,8 @@ HANDLE hUpdateMutex;
LIST<CFeedEditor> g_arFeeds(1, PtrKeySortT);
+/////////////////////////////////////////////////////////////////////////////////////////
+
PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
@@ -42,18 +44,16 @@ PLUGININFOEX pluginInfoEx = {
{0x56cc3f29, 0xccbf, 0x4546, {0xa8, 0xba, 0x98, 0x56, 0x24, 0x8a, 0x41, 0x2a}}
};
-bool WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID)
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- hInst = hinstDLL;
- return TRUE;
+ return &pluginInfoEx;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfoEx;
-}
+/////////////////////////////////////////////////////////////////////////////////////////
extern "C" __declspec(dllexport) int Load(void)
{
@@ -97,6 +97,8 @@ extern "C" __declspec(dllexport) int Load(void)
return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) int Unload(void)
{
DestroyUpdateList();
@@ -106,13 +108,15 @@ extern "C" __declspec(dllexport) int Unload(void)
/////////////////////////////////////////////////////////////////////////////////////////
-struct CMPlugin : public CMPluginBase
+struct CMPlugin : public PLUGIN<CMPlugin>
{
CMPlugin() :
- CMPluginBase(MODULE)
+ PLUGIN<CMPlugin>(MODULE)
{
RegisterProtocol(PROTOTYPE_VIRTUAL);
SetUniqueId("URL");
}
}
g_plugin;
+
+extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;