diff options
author | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2008-12-11 01:13:32 +0000 |
---|---|---|
committer | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2008-12-11 01:13:32 +0000 |
commit | eb3076751d679ceadfdeeec6fc74dc9fd2cd23fe (patch) | |
tree | 65e7763d41124fb1934221d7b81b917c0412abb1 /metacontacts/meta_main.c | |
parent | 8b6ee5eab7bf6a0337a09da78b5924b346cce2d6 (diff) |
Added error message on pre 0.8 Miranda version
Disabled loading for pre 0.8 Miranda version
Cleanup of mmi initialization code
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@433 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'metacontacts/meta_main.c')
-rw-r--r-- | metacontacts/meta_main.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/metacontacts/meta_main.c b/metacontacts/meta_main.c index f8184e0..62db9ba 100644 --- a/metacontacts/meta_main.c +++ b/metacontacts/meta_main.c @@ -87,8 +87,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Use VersionNo.h to set the version number, and ensure resource file is not open
#include "version.h"
-struct MM_INTERFACE memoryManagerInterface;
-
+struct MM_INTERFACE mmi;
BOOL os_unicode_enabled = FALSE;
//! Information gathered by Miranda, displayed in the plugin pane of the Option Dialog
@@ -117,13 +116,11 @@ HANDLE metaMainThread; //!< Duplicate of thread handle */
__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
- return mirandaVersion < PLUGIN_MAKE_VERSION(0,8,0,0) ? NULL : &pluginInfo;
-}
-
-__declspec(dllexport) PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion)
-{
- pluginInfo.cbSize = sizeof(PLUGININFO);
- return (PLUGININFO*)&pluginInfo;
+ if ( mirandaVersion < PLUGIN_MAKE_VERSION( 0, 8, 0, 0 )) {
+ MessageBox( NULL, _T("The MetaContacts cannot be loaded. It requires Miranda IM 0.8.0.0 or later."), _T("Miranda"), MB_OK|MB_ICONWARNING|MB_SETFOREGROUND|MB_TOPMOST );
+ return NULL;
+ }
+ return &pluginInfo;
}
static const MUUID interfaces[] = {MIID_PROTOCOL, MIID_METACONTACTS, MIID_LAST};
@@ -174,8 +171,7 @@ int __declspec(dllexport)Load(PLUGINLINK *link) pluginLink=link;
DuplicateHandle( GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &metaMainThread, THREAD_SET_CONTEXT, FALSE, 0 );
- memoryManagerInterface.cbSize = sizeof(memoryManagerInterface);
- CallService(MS_SYSTEM_GET_MMI, 0, (LPARAM)&memoryManagerInterface);
+ mir_getMMI(&mmi);
os_unicode_enabled = IsUnicodeOS();
|