From 5f3e3abd23f5ec503976885a073aae2c2a276ade Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 24 Nov 2014 14:19:23 +0000 Subject: - 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 --- plugins/mTextControl/src/main.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'plugins/mTextControl/src/main.cpp') 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(); -- cgit v1.2.3