summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/main.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-02-28 06:48:33 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-02-28 06:48:33 +0000
commit21e7268a503be780b35e367564d711e79a61dffc (patch)
tree87b408e722116a6faea0d029d090e6278cda0f28 /protocols/Tox/src/main.cpp
parent4410284da77786594d7009b6c515176de0d5a51e (diff)
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
Diffstat (limited to 'protocols/Tox/src/main.cpp')
-rw-r--r--protocols/Tox/src/main.cpp17
1 files changed, 16 insertions, 1 deletions
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