From b172c4bbc75cdad0e8ccd22292aa671ba43cac45 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 18 Apr 2018 18:14:33 +0300 Subject: PLUGIN<> to half-automatically calculate the dll's g_hInstance and pass it inside --- protocols/MRA/src/Mra.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'protocols/MRA') diff --git a/protocols/MRA/src/Mra.cpp b/protocols/MRA/src/Mra.cpp index 79dfebf977..68373ab59b 100644 --- a/protocols/MRA/src/Mra.cpp +++ b/protocols/MRA/src/Mra.cpp @@ -29,17 +29,7 @@ WCHAR g_szMirWorkDirPath[MAX_FILEPATH]; void IconsLoad(); -BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID) -{ - switch (dwReason) { - case DLL_PROCESS_ATTACH: - g_hInstance = hInstance; - DisableThreadLibraryCalls(hInstance); - break; - } - - return TRUE; -} +extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain; extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST }; -- cgit v1.2.3