diff options
Diffstat (limited to 'protocols/Telegram/src/main.cpp')
-rw-r--r-- | protocols/Telegram/src/main.cpp | 20 |
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;
}
|