From 10bc9e42dfba6ed8be41199243d688c2e367dc0d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 30 Jun 2015 18:59:38 +0000 Subject: MS_CLIST_GETSTATUSMODEDESCRIPTION & MS_CLIST_GETCONTACTDISPLAYNAME replaced with pcli->* members git-svn-id: http://svn.miranda-ng.org/main/trunk@14459 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirandaG15/src/Miranda.cpp | 64 ++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 30 deletions(-) (limited to 'plugins/MirandaG15/src/Miranda.cpp') diff --git a/plugins/MirandaG15/src/Miranda.cpp b/plugins/MirandaG15/src/Miranda.cpp index d40cbc86fa..1515978515 100644 --- a/plugins/MirandaG15/src/Miranda.cpp +++ b/plugins/MirandaG15/src/Miranda.cpp @@ -58,6 +58,7 @@ bool g_bInitialized; // Plugin Information +CLIST_INTERFACE *pcli; HINSTANCE hInstance; int hLangpack; @@ -87,40 +88,43 @@ void UnInit(); //************************************************************************ // Exported Functions //************************************************************************ -extern "C" { - __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) - { - return &pluginInfoEx; - } + +EXTERN_C __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +{ + return &pluginInfoEx; +} - // Called by Miranda to load the plugin. - // We defer initialization until Miranda's module loading process completed and return 0 to - // mark success, everything else will cause the plugin to be freed right away. - int __declspec(dllexport) Load() - { - g_bInitialized = false; - InitDebug(); - TRACE(_T("Plugin loaded\n")); - // Schedule actual initialization for later - HookEvent(ME_SYSTEM_MODULESLOADED, Init); - return 0; - } +// Called by Miranda to load the plugin. +// We defer initialization until Miranda's module loading process completed and return 0 to +// mark success, everything else will cause the plugin to be freed right away. +EXTERN_C int __declspec(dllexport) Load() +{ + mir_getLP(&pluginInfoEx); + mir_getCLI(); + + g_bInitialized = false; + + InitDebug(); + TRACE(_T("Plugin loaded\n")); + // Schedule actual initialization for later + HookEvent(ME_SYSTEM_MODULESLOADED, Init); + return 0; +} - // Called by Miranda when the plugin should unload itself. - int __declspec(dllexport) Unload(void) - { - if(!g_bInitialized) { - TRACE(_T("ERROR: Unload requested, but plugin is not initialized?!\n")); - return 0; - } - TRACE(_T("-------------------------------------------\nUnloading started\n")); - UnInit(); - TRACE(_T("Unloading successful\n")); - TRACE(_T("Cleaning up: ")); - UnInitDebug(); - TRACE(_T("OK!\n")); +// Called by Miranda when the plugin should unload itself. +EXTERN_C int __declspec(dllexport) Unload(void) +{ + if(!g_bInitialized) { + TRACE(_T("ERROR: Unload requested, but plugin is not initialized?!\n")); return 0; } + TRACE(_T("-------------------------------------------\nUnloading started\n")); + UnInit(); + TRACE(_T("Unloading successful\n")); + TRACE(_T("Cleaning up: ")); + UnInitDebug(); + TRACE(_T("OK!\n")); + return 0; } //************************************************************************ -- cgit v1.2.3