From 21e7268a503be780b35e367564d711e79a61dffc Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sat, 28 Feb 2015 06:48:33 +0000 Subject: Tox: - added support of tox1 dns resolving - added request/grant items in contact menu - added copy id item in statum menu - code reordering - fixed minor bugs git-svn-id: http://svn.miranda-ng.org/main/trunk@12281 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/main.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'protocols/Tox/src/main.cpp') diff --git a/protocols/Tox/src/main.cpp b/protocols/Tox/src/main.cpp index fd0f48aab0..6d9711e12d 100644 --- a/protocols/Tox/src/main.cpp +++ b/protocols/Tox/src/main.cpp @@ -35,6 +35,12 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_PROTOCO extern "C" int __declspec(dllexport) Load(void) { + g_hToxLibrary = LoadLibrary(_T("libtox.dll")); + if (g_hToxLibrary == NULL) + { + return 0; + } + mir_getLP(&pluginInfo); PROTOCOLDESCRIPTOR pd = { sizeof(pd) }; @@ -42,14 +48,23 @@ extern "C" int __declspec(dllexport) Load(void) pd.type = PROTOTYPE_PROTOCOL; pd.fnInit = (pfnInitProto)CToxProto::InitAccount; pd.fnUninit = (pfnUninitProto)CToxProto::UninitAccount; - return CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd); + CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd); + + CToxProto::InitIcons(); + CToxProto::InitMenus(); + + return 0; } extern "C" int __declspec(dllexport) Unload(void) { + CToxProto::UninitIcons(); + CToxProto::UninitMenus(); + if (g_hToxLibrary) { FreeLibrary(g_hToxLibrary); } + return 0; } \ No newline at end of file -- cgit v1.2.3