diff options
Diffstat (limited to 'plugins/mTextControl/src/main.cpp')
-rw-r--r-- | plugins/mTextControl/src/main.cpp | 11 |
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;
|