summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r--protocols/SkypeWeb/src/main.cpp38
-rw-r--r--protocols/SkypeWeb/src/skype_icons.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_options.cpp2
-rw-r--r--protocols/SkypeWeb/src/stdafx.h1
4 files changed, 23 insertions, 20 deletions
diff --git a/protocols/SkypeWeb/src/main.cpp b/protocols/SkypeWeb/src/main.cpp
index bc5ebf60f3..1b358e0651 100644
--- a/protocols/SkypeWeb/src/main.cpp
+++ b/protocols/SkypeWeb/src/main.cpp
@@ -17,9 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-CMPlugin g_plugin;
int hLangpack;
-HINSTANCE g_hInstance;
CLIST_INTERFACE *pcli;
char g_szMirVer[100];
HANDLE g_hCallEvent;
@@ -39,15 +37,32 @@ PLUGININFOEX pluginInfo =
{ 0x57e90ac6, 0x1067, 0x423b, { 0x8c, 0xa3, 0x70, 0xa3, 0x9d, 0x20, 0xd, 0x4f } }
};
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
return &pluginInfo;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
+CMPlugin g_plugin;
+
+extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
+/////////////////////////////////////////////////////////////////////////////////////////
+
+int CSkypeProto::OnModulesLoaded(WPARAM, LPARAM)
+{
+ if (ServiceExists(MS_ASSOCMGR_ADDNEWURLTYPE)) {
+ CreateServiceFunction(MODULE "/ParseUri", CSkypeProto::GlobalParseSkypeUriService);
+ AssocMgr_AddNewUrlTypeW("skype:", TranslateT("Skype Link Protocol"), g_plugin.getInst(), IDI_SKYPE, MODULE "/ParseUri", 0);
+ }
+ return 0;
+}
+
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
@@ -69,21 +84,10 @@ extern "C" int __declspec(dllexport) Load(void)
return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Unload(void)
{
-
DestroyHookableEvent(g_hCallEvent);
-
- return 0;
-}
-
-
-int CSkypeProto::OnModulesLoaded(WPARAM, LPARAM)
-{
- if (ServiceExists(MS_ASSOCMGR_ADDNEWURLTYPE))
- {
- CreateServiceFunction(MODULE "/ParseUri", CSkypeProto::GlobalParseSkypeUriService);
- AssocMgr_AddNewUrlTypeW("skype:", TranslateT("Skype Link Protocol"), g_hInstance, IDI_SKYPE, MODULE "/ParseUri", 0);
- }
return 0;
}
diff --git a/protocols/SkypeWeb/src/skype_icons.cpp b/protocols/SkypeWeb/src/skype_icons.cpp
index 412d0c0043..7aba64a40a 100644
--- a/protocols/SkypeWeb/src/skype_icons.cpp
+++ b/protocols/SkypeWeb/src/skype_icons.cpp
@@ -32,7 +32,7 @@ IconItemT CSkypeProto::Icons[] =
void CSkypeProto::InitIcons()
{
- Icon_RegisterT(g_hInstance, LPGENW("Protocols") L"/" _A2W(MODULE), Icons, _countof(Icons), MODULE);
+ Icon_RegisterT(g_plugin.getInst(), LPGENW("Protocols") L"/" _A2W(MODULE), Icons, _countof(Icons), MODULE);
}
HICON CSkypeProto::GetIcon(int iconId)
diff --git a/protocols/SkypeWeb/src/skype_options.cpp b/protocols/SkypeWeb/src/skype_options.cpp
index a8941a18ee..2bac189297 100644
--- a/protocols/SkypeWeb/src/skype_options.cpp
+++ b/protocols/SkypeWeb/src/skype_options.cpp
@@ -71,7 +71,7 @@ void CSkypeOptionsMain::OnApply()
int CSkypeProto::OnOptionsInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
- odp.hInstance = g_hInstance;
+ odp.hInstance = g_plugin.getInst();
odp.szTitle.w = m_tszUserName;
odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE;
odp.szGroup.w = LPGENW("Network");
diff --git a/protocols/SkypeWeb/src/stdafx.h b/protocols/SkypeWeb/src/stdafx.h
index 2cb4883414..0be6ba5730 100644
--- a/protocols/SkypeWeb/src/stdafx.h
+++ b/protocols/SkypeWeb/src/stdafx.h
@@ -58,7 +58,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
struct CSkypeProto;
-extern HINSTANCE g_hInstance;
extern char g_szMirVer[];
extern HANDLE g_hCallEvent;