summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/main.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2016-03-25 16:20:45 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2016-03-25 16:20:45 +0000
commitc0cb5774e9ceb7fdb40b2387217f8b5be70eb315 (patch)
treec82c5a64d631b0319a5ba933ccb76d9425e77cec /protocols/Telegram/src/main.cpp
parent8e759e2624850a183d6e79a0b3a94a64e7895936 (diff)
Telegram: winapi timers
git-svn-id: http://svn.miranda-ng.org/main/trunk@16543 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Telegram/src/main.cpp')
-rw-r--r--protocols/Telegram/src/main.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/protocols/Telegram/src/main.cpp b/protocols/Telegram/src/main.cpp
index ca4ccacb51..a186d24ca0 100644
--- a/protocols/Telegram/src/main.cpp
+++ b/protocols/Telegram/src/main.cpp
@@ -17,10 +17,27 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
+#include <delayimp.h>
+#pragma comment(lib, "delayimp.lib")
+
+FARPROC WINAPI delayHook(unsigned dliNotify, PDelayLoadInfo dli)
+{
+ switch (dliNotify)
+ {
+ case dliNotePreLoadLibrary:
+ return (FARPROC)LoadLibraryA(dli->szDll);
+ }
+ return NULL;
+}
+
+extern "C" PfnDliHook __pfnDliNotifyHook2 = delayHook;
+
+
int hLangpack;
HINSTANCE g_hInstance;
CLIST_INTERFACE *pcli;
char g_szMirVer[100];
+HANDLE hQueue;
PLUGININFOEX pluginInfo =
{
@@ -54,6 +71,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC
extern "C" int __declspec(dllexport) Load(void)
{
+ hQueue = CreateTimerQueue();
mir_getLP(&pluginInfo);
mir_getCLI();
@@ -75,7 +93,7 @@ extern "C" int __declspec(dllexport) Load(void)
extern "C" int __declspec(dllexport) Unload(void)
{
-
+ DeleteTimerQueue(hQueue);
return 0;
}