summaryrefslogtreecommitdiff
path: root/plugins/mTextControl/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mTextControl/src/main.cpp')
-rw-r--r--plugins/mTextControl/src/main.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/mTextControl/src/main.cpp b/plugins/mTextControl/src/main.cpp
index 512b86a543..d1ded43909 100644
--- a/plugins/mTextControl/src/main.cpp
+++ b/plugins/mTextControl/src/main.cpp
@@ -25,8 +25,7 @@ CMPlugin g_plugin;
HMODULE hMsfteditDll = nullptr;
-typedef HRESULT(WINAPI *pfnMyCreateTextServices)(IUnknown *punkOuter, ITextHost *pITextHost, IUnknown **ppUnk);
-pfnMyCreateTextServices MyCreateTextServices = nullptr;
+PCreateTextServices MyCreateTextServices = nullptr;
/////////////////////////////////////////////////////////////////////////////////////////
@@ -50,14 +49,15 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
+void MTextControl_RegisterClass();
+
int CMPlugin::Load()
{
MyCreateTextServices = nullptr;
hMsfteditDll = LoadLibrary(L"msftedit.dll");
if (hMsfteditDll)
- MyCreateTextServices = (pfnMyCreateTextServices)GetProcAddress(hMsfteditDll, "CreateTextServices");
+ MyCreateTextServices = (PCreateTextServices)GetProcAddress(hMsfteditDll, "CreateTextServices");
- LoadRichEdit();
LoadTextUsers();
LoadServices();
@@ -67,10 +67,11 @@ int CMPlugin::Load()
/////////////////////////////////////////////////////////////////////////////////////////
+void UnloadEmfCache();
+
int CMPlugin::Unload()
{
UnloadTextUsers();
- UnloadRichEdit();
UnloadEmfCache();
FreeLibrary(hMsfteditDll);
return 0;