diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-05-18 20:27:43 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-05-18 20:27:43 +0000 |
commit | 6dfdccb3decd016ced438309d326547e5244604e (patch) | |
tree | aa699dd48dcf31ef7e534ab0e3834034457f58b0 /plugins | |
parent | 9ed5a0436109770d38318ae9a3c117f46aeefa5e (diff) |
compilation fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@55 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Autorun/autorun.h | 1 | ||||
-rw-r--r-- | plugins/Boltun/boltun.cpp | 12 | ||||
-rw-r--r-- | plugins/Bonsai/FixOptions/Bonsai.cpp | 7 | ||||
-rw-r--r-- | plugins/Bonsai/FixOptions/FixOptions.vcxproj | 2 | ||||
-rw-r--r-- | plugins/Bonsai/FixOptions/FixOptions.vcxproj.filters | 6 | ||||
-rw-r--r-- | plugins/Bonsai/FixOptions/commonheaders.h | 1 | ||||
-rw-r--r-- | plugins/Bonsai/FixOptions/mirandaMem.cpp | 35 | ||||
-rw-r--r-- | plugins/Bonsai/FixOptions/mirandaMem.h | 32 | ||||
-rw-r--r-- | plugins/Bonsai/FixOptions/utils.cpp | 8 |
9 files changed, 15 insertions, 89 deletions
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 @@ <ClCompile Include="dlg_handlers.cpp" />
<ClCompile Include="hooked_events.cpp" />
<ClCompile Include="list.cpp" />
- <ClCompile Include="mirandaMem.cpp" />
<ClCompile Include="services.cpp" />
<ClCompile Include="utils.cpp" />
</ItemGroup>
@@ -193,7 +192,6 @@ <ClInclude Include="dlg_handlers.h" />
<ClInclude Include="hooked_events.h" />
<ClInclude Include="list.h" />
- <ClInclude Include="mirandaMem.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="services.h" />
<ClInclude Include="utils.h" />
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 @@ <ClCompile Include="list.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="mirandaMem.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="services.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -50,9 +47,6 @@ <ClInclude Include="list.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="mirandaMem.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
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;
|