summaryrefslogtreecommitdiff
path: root/plugins/mTextControl/src/main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-11-24 14:19:23 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-11-24 14:19:23 +0000
commit5f3e3abd23f5ec503976885a073aae2c2a276ade (patch)
treedc4d38b0fd2accd1edf333646b9dcd084efce67c /plugins/mTextControl/src/main.cpp
parent5f5679475c4817314d5211e7f9714de0fea3efe3 (diff)
- fix for thread control in Popup+;
- fix for a very specific crash on exit in MTextControl; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@11048 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/mTextControl/src/main.cpp')
-rw-r--r--plugins/mTextControl/src/main.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/plugins/mTextControl/src/main.cpp b/plugins/mTextControl/src/main.cpp
index b24611b317..507fb5f684 100644
--- a/plugins/mTextControl/src/main.cpp
+++ b/plugins/mTextControl/src/main.cpp
@@ -25,7 +25,9 @@ HINSTANCE hInst = 0;
int hLangpack;
HMODULE hMsfteditDll = 0;
-HRESULT (WINAPI *MyCreateTextServices)(IUnknown *punkOuter, ITextHost *pITextHost, IUnknown **ppUnk);
+
+typedef HRESULT (WINAPI *pfnMyCreateTextServices)(IUnknown *punkOuter, ITextHost *pITextHost, IUnknown **ppUnk);
+pfnMyCreateTextServices MyCreateTextServices = NULL;
PLUGININFOEX pluginInfoEx =
{
@@ -59,13 +61,8 @@ extern "C" __declspec(dllexport) int Load(void)
MyCreateTextServices = 0;
hMsfteditDll = LoadLibrary(_T("msftedit.dll"));
- if (hMsfteditDll) {
- MyCreateTextServices = (HRESULT (WINAPI *)(
- IUnknown *punkOuter,
- ITextHost *pITextHost,
- IUnknown **ppUnk))
- GetProcAddress(hMsfteditDll, "CreateTextServices");
- }
+ if (hMsfteditDll)
+ MyCreateTextServices = (pfnMyCreateTextServices)GetProcAddress(hMsfteditDll, "CreateTextServices");
LoadEmfCache();
LoadRichEdit();