diff options
Diffstat (limited to 'plugins/NotifyAnything/src/main.cpp')
-rw-r--r-- | plugins/NotifyAnything/src/main.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/plugins/NotifyAnything/src/main.cpp b/plugins/NotifyAnything/src/main.cpp index 2cef244540..a08a7d7dce 100644 --- a/plugins/NotifyAnything/src/main.cpp +++ b/plugins/NotifyAnything/src/main.cpp @@ -24,10 +24,13 @@ volatile bool g_exit_threads, g_firstrun; std::wstring g_mirandaDir;
mir_cs g_wsocklock;
-HINSTANCE hInst;
+CMPlugin g_plugin;
int hLangpack;
-PLUGININFOEX pluginInfo = {
+/////////////////////////////////////////////////////////////////////////////////////////
+
+PLUGININFOEX pluginInfo =
+{
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
@@ -40,13 +43,13 @@ PLUGININFOEX pluginInfo = { { 0xe92874ec, 0x594a, 0x4a2f, { 0xbd, 0xed, 0xc0, 0xbe, 0x8b, 0x5a, 0x45, 0xd1 } }
};
-BOOL WINAPI DllMain(HINSTANCE hi, DWORD, LPVOID)
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
- hInst = hi;
- DisableThreadLibraryCalls(hInst);
- return TRUE;
+ return &pluginInfo;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
enum replace_mode_t {
xno,
xappend,
@@ -962,10 +965,7 @@ void stop_threads() WaitForSingleObject(g_tcp_thread, INFINITE);
}
-extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
-{
- return &pluginInfo;
-}
+/////////////////////////////////////////////////////////////////////////////////////////
extern "C" int __declspec(dllexport) Load()
{
@@ -988,6 +988,8 @@ extern "C" int __declspec(dllexport) Load() return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Unload(void)
{
stop_threads();
|