summaryrefslogtreecommitdiff
path: root/protocols/Dummy
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Dummy')
-rw-r--r--protocols/Dummy/src/dummy.h2
-rw-r--r--protocols/Dummy/src/dummy_options.cpp2
-rw-r--r--protocols/Dummy/src/main.cpp14
3 files changed, 7 insertions, 11 deletions
diff --git a/protocols/Dummy/src/dummy.h b/protocols/Dummy/src/dummy.h
index 67f7da5716..90b08dd243 100644
--- a/protocols/Dummy/src/dummy.h
+++ b/protocols/Dummy/src/dummy.h
@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
struct CDummyProto;
extern LIST<CDummyProto> dummy_Instances;
-extern HINSTANCE hInst;
+extern HINSTANCE g_hInstance;
#define DUMMY_ID_TEMPLATE "Template"
#define DUMMY_ID_TEXT "UniqueIdText"
diff --git a/protocols/Dummy/src/dummy_options.cpp b/protocols/Dummy/src/dummy_options.cpp
index c2a156bd4e..701d647589 100644
--- a/protocols/Dummy/src/dummy_options.cpp
+++ b/protocols/Dummy/src/dummy_options.cpp
@@ -116,5 +116,5 @@ INT_PTR CALLBACK DummyAccountProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
INT_PTR CDummyProto::SvcCreateAccMgrUI(WPARAM, LPARAM lParam)
{
- return (INT_PTR)CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ACCMGRUI), (HWND)lParam, DummyAccountProc, (LPARAM)this);
+ return (INT_PTR)CreateDialogParam(g_hInstance, MAKEINTRESOURCE(IDD_ACCMGRUI), (HWND)lParam, DummyAccountProc, (LPARAM)this);
}
diff --git a/protocols/Dummy/src/main.cpp b/protocols/Dummy/src/main.cpp
index 6a57644bf3..93492c1df6 100644
--- a/protocols/Dummy/src/main.cpp
+++ b/protocols/Dummy/src/main.cpp
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
#include "version.h"
-HINSTANCE hInst;
+HINSTANCE g_hInstance;
int hLangpack;
CLIST_INTERFACE *pcli;
@@ -36,19 +36,13 @@ PLUGININFOEX pluginInfo =
{ 0x2a1081d1, 0xaee3, 0x4091, {0xb7, 0xd, 0xae, 0x46, 0xd0, 0x9f, 0x9a, 0x7f}}
};
-/////////////////////////////////////////////////////////////////////////////////////////
-
-BOOL WINAPI DllMain(HINSTANCE hModule, DWORD, LPVOID)
-{
- hInst = hModule;
- return TRUE;
-}
-
extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD)
{
return &pluginInfo;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_PROTOCOL, MIID_LAST};
/////////////////////////////////////////////////////////////////////////////////////////
@@ -94,3 +88,5 @@ struct CMPlugin : public ACCPROTOPLUGIN<CDummyProto>
}
}
g_plugin;
+
+extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;