From 6dfdccb3decd016ced438309d326547e5244604e Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 18 May 2012 20:27:43 +0000 Subject: compilation fix git-svn-id: http://svn.miranda-ng.org/main/trunk@55 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Autorun/autorun.h | 1 + plugins/Boltun/boltun.cpp | 12 ++++---- plugins/Bonsai/FixOptions/Bonsai.cpp | 7 ++--- plugins/Bonsai/FixOptions/FixOptions.vcxproj | 2 -- .../Bonsai/FixOptions/FixOptions.vcxproj.filters | 6 ---- plugins/Bonsai/FixOptions/commonheaders.h | 1 - plugins/Bonsai/FixOptions/mirandaMem.cpp | 35 ---------------------- plugins/Bonsai/FixOptions/mirandaMem.h | 32 -------------------- plugins/Bonsai/FixOptions/utils.cpp | 8 ++--- 9 files changed, 15 insertions(+), 89 deletions(-) delete mode 100644 plugins/Bonsai/FixOptions/mirandaMem.cpp delete mode 100644 plugins/Bonsai/FixOptions/mirandaMem.h (limited to 'plugins') diff --git a/plugins/Autorun/autorun.h b/plugins/Autorun/autorun.h index 4452ef7a4a..a991061066 100644 --- a/plugins/Autorun/autorun.h +++ b/plugins/Autorun/autorun.h @@ -1,6 +1,7 @@ #define IDD_OPT_AUTORUN 101 #define IDC_AUTORUN 102 +#define MIRANDA_VER 0x0A00 #define SUB_KEY "Software\\Microsoft\\Windows\\CurrentVersion\\Run" #define ModuleName "Autorun" diff --git a/plugins/Boltun/boltun.cpp b/plugins/Boltun/boltun.cpp index bdad74deec..372995be7c 100644 --- a/plugins/Boltun/boltun.cpp +++ b/plugins/Boltun/boltun.cpp @@ -59,8 +59,8 @@ BOOL blInit = FALSE; UINT pTimer = 0; TCHAR *path; -PLUGININFO pluginInfo={ - sizeof(PLUGININFO), +PLUGININFOEX pluginInfo={ + sizeof(PLUGININFOEX), BOLTUN_NAME, PLUGIN_MAKE_VERSION(0,0,3,0), PLUGIN_DESCRIPTION, @@ -69,7 +69,9 @@ PLUGININFO pluginInfo={ "© 2003-2008 Alexander S. Kiselev A.K.A. KAS, Valentin Pavlyuchenko", "http://miranda-im.org", UNICODE_AWARE, - 0 + 0, + // {488C5C84-56DA-434F-96F1-B18900DEF760} + { 0x488c5c84, 0x56da, 0x434f, { 0x96, 0xf1, 0xb1, 0x89, 0x0, 0xde, 0xf7, 0x60 } } }; static HANDLE hEventDbEventAdded; @@ -618,7 +620,7 @@ static int MessagePrebuild(WPARAM wParam, LPARAM lParam) return 0; } -extern "C" __declspec(dllexport) PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion) +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfo(DWORD mirandaVersion) { return &pluginInfo; } @@ -626,7 +628,7 @@ extern "C" __declspec(dllexport) PLUGININFO* MirandaPluginInfo(DWORD mirandaVers extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) { pluginLink = link; - mir_getLP(&pluginInfoEx); + mir_getLP(&pluginInfo); mmi.cbSize=sizeof(struct MM_INTERFACE); CallService(MS_SYSTEM_GET_MMI,0,(LPARAM)&mmi); diff --git a/plugins/Bonsai/FixOptions/Bonsai.cpp b/plugins/Bonsai/FixOptions/Bonsai.cpp index cddbf70ff5..bea3156f89 100644 --- a/plugins/Bonsai/FixOptions/Bonsai.cpp +++ b/plugins/Bonsai/FixOptions/Bonsai.cpp @@ -34,6 +34,7 @@ HIMAGELIST imgList = NULL; PLUGINLINK *pluginLink; int hLangpack; +struct MM_INTERFACE mmi; PLUGININFOEX pluginInfo = { sizeof(PLUGININFOEX), @@ -80,15 +81,13 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) LogInit(); pluginLink = link; - mir_getLP(&pluginInfoEx); + mir_getMMI(&mmi); + mir_getLP(&pluginInfo); InitServices(); HookEvents(); - InitializeMirandaMemFunctions(); - - hbModified = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_MODIFIED)); hbUnmodified = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_UNMODIFIED)); hbHidden = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_HIDDEN)); diff --git a/plugins/Bonsai/FixOptions/FixOptions.vcxproj b/plugins/Bonsai/FixOptions/FixOptions.vcxproj index a2873a0476..67a96c954e 100644 --- a/plugins/Bonsai/FixOptions/FixOptions.vcxproj +++ b/plugins/Bonsai/FixOptions/FixOptions.vcxproj @@ -184,7 +184,6 @@ - @@ -193,7 +192,6 @@ - diff --git a/plugins/Bonsai/FixOptions/FixOptions.vcxproj.filters b/plugins/Bonsai/FixOptions/FixOptions.vcxproj.filters index 263e9a73f1..3bb27e93ca 100644 --- a/plugins/Bonsai/FixOptions/FixOptions.vcxproj.filters +++ b/plugins/Bonsai/FixOptions/FixOptions.vcxproj.filters @@ -27,9 +27,6 @@ Source Files - - Source Files - Source Files @@ -50,9 +47,6 @@ Header Files - - Header Files - Header Files diff --git a/plugins/Bonsai/FixOptions/commonheaders.h b/plugins/Bonsai/FixOptions/commonheaders.h index 0bc013dcdf..29ebda9d46 100644 --- a/plugins/Bonsai/FixOptions/commonheaders.h +++ b/plugins/Bonsai/FixOptions/commonheaders.h @@ -50,7 +50,6 @@ typedef INT_PTR (*MIRANDASERVICE)(WPARAM,LPARAM); #include "version.h" #include "utils.h" -#include "mirandaMem.h" #include "services.h" #include "list.h" #include "dlg_handlers.h" diff --git a/plugins/Bonsai/FixOptions/mirandaMem.cpp b/plugins/Bonsai/FixOptions/mirandaMem.cpp deleted file mode 100644 index 05280dbbdb..0000000000 --- a/plugins/Bonsai/FixOptions/mirandaMem.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* -Bonsai plugin for Miranda IM - -Copyright © 2006 Cristian Libotean - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include "mirandaMem.h" - -void *(*MirandaMalloc)(size_t size) = NULL; -void *(*MirandaRealloc)(void *data, size_t newSize) = NULL; -void (*MirandaFree) (void *data) = NULL; - -void InitializeMirandaMemFunctions() -{ - struct MM_INTERFACE mmi = {0}; - mmi.cbSize = sizeof(MM_INTERFACE); - CallService(MS_SYSTEM_GET_MMI, 0, (LPARAM) &mmi); - MirandaMalloc = mmi.mmi_malloc; - MirandaRealloc = mmi.mmi_realloc; - MirandaFree = mmi.mmi_free; -} \ No newline at end of file diff --git a/plugins/Bonsai/FixOptions/mirandaMem.h b/plugins/Bonsai/FixOptions/mirandaMem.h deleted file mode 100644 index 6f7b12aa9e..0000000000 --- a/plugins/Bonsai/FixOptions/mirandaMem.h +++ /dev/null @@ -1,32 +0,0 @@ -/* -Bonsai plugin for Miranda IM - -Copyright © 2006 Cristian Libotean - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#ifndef M_BONSAI_MIRANDA_MEM_H -#define M_BONSAI_MIRANDA_MEM_H - -#include "commonheaders.h" - -extern void *(*MirandaMalloc)(size_t size); -extern void *(*MirandaRealloc)(void *data, size_t newSize); -extern void (*MirandaFree) (void *data); - -void InitializeMirandaMemFunctions(); - -#endif \ No newline at end of file diff --git a/plugins/Bonsai/FixOptions/utils.cpp b/plugins/Bonsai/FixOptions/utils.cpp index f47f78592c..3f30dc44ad 100644 --- a/plugins/Bonsai/FixOptions/utils.cpp +++ b/plugins/Bonsai/FixOptions/utils.cpp @@ -145,7 +145,7 @@ int GetStringFromDatabase(HANDLE hContact, char *szModule, char *szSettingName, len = (tmp < size - 1) ? tmp : size - 1; strncpy(szResult, dbv.pszVal, len); szResult[len] = '\0'; - MirandaFree(dbv.pszVal); + mir_free(dbv.pszVal); } else{ res = 1; @@ -182,7 +182,7 @@ int GetStringFromDatabase(HANDLE hContact, char *szModule, char *szSettingName, wcsncpy(szResult, dbv.pwszVal, len); szResult[len] = L'\0'; } - MirandaFree(dbv.pwszVal); + mir_free(dbv.pwszVal); } else{ res = 1; @@ -240,7 +240,7 @@ TCHAR *GetContactName(HANDLE hContact, char *szProto) { buffer = _tcsdup(ctInfo.pszVal); } - MirandaFree(ctInfo.pszVal); + mir_free(ctInfo.pszVal); if (!ret) { return buffer; @@ -323,7 +323,7 @@ TCHAR *GetContactID(HANDLE hContact, char *szProto) } - MirandaFree(ctInfo.pszVal); + mir_free(ctInfo.pszVal); if (!ret) { return buffer; -- cgit v1.2.3