summaryrefslogtreecommitdiff
path: root/protocols/Quotes/Forex.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2012-09-24 20:33:28 +0000
committerKirill Volinsky <mataes2007@gmail.com>2012-09-24 20:33:28 +0000
commit5ef7edee2a5d7eae4bb110e497d2e63b633348c8 (patch)
tree33ade0a35721a3f056d313e6cb3d5347b9b117aa /protocols/Quotes/Forex.cpp
parentaf1c7bfc0cd0f76570e364dbb57cf447052c1ed5 (diff)
Quotes:
fixed crash on start git-svn-id: http://svn.miranda-ng.org/main/trunk@1643 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Quotes/Forex.cpp')
-rw-r--r--protocols/Quotes/Forex.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/protocols/Quotes/Forex.cpp b/protocols/Quotes/Forex.cpp
index 05d1ecaabb..ab27ba41c3 100644
--- a/protocols/Quotes/Forex.cpp
+++ b/protocols/Quotes/Forex.cpp
@@ -31,7 +31,7 @@
#include "version.h"
int hLangpack;
-
+HINSTANCE g_hInstance = NULL;
HANDLE g_hEventWorkThreadStop;
int g_nStatus = ID_STATUS_OFFLINE;
HGENMENU g_hMenuEditSettings = NULL;
@@ -352,7 +352,7 @@ namespace
OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.position = 910000000;
- odp.hInstance = CModuleInfo::GetModuleHandle();
+ odp.hInstance = g_hInstance;
odp.ptszTitle = _T(QUOTES_PROTOCOL_NAME);
odp.ptszGroup = LPGENT("Network");
odp.hIcon = Quotes_LoadIconEx(ICON_STR_MAIN);
@@ -392,6 +392,12 @@ namespace
}
+BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
+{
+ g_hInstance = hinstDLL;
+ return TRUE;
+}
+
extern "C"
{
__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)