From 6475b110c06ebd29fda4e4d8104e9cb121c99eeb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 7 Jun 2012 15:23:57 +0000 Subject: various 64-bit compilation issues git-svn-id: http://svn.miranda-ng.org/main/trunk@356 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AssocMgr/dde.cpp | 4 +- plugins/ExternalAPI/m_historyevents.h | 6 +-- plugins/NewAwaySysMod/NewAwaySys.vcxproj | 2 +- plugins/NewAwaySysMod/NewAwaySys.vcxproj.filters | 2 +- plugins/NewXstatusNotify/main.cpp | 5 +-- plugins/ProfileManager/pmanagerEx.c | 47 ++++++++++++++---------- plugins/Rate/commonheaders.h | 2 +- plugins/Svc_crshdmp/utils.h | 2 + 8 files changed, 39 insertions(+), 31 deletions(-) (limited to 'plugins') diff --git a/plugins/AssocMgr/dde.cpp b/plugins/AssocMgr/dde.cpp index 5b95499c5d..dc03e7e0cc 100644 --- a/plugins/AssocMgr/dde.cpp +++ b/plugins/AssocMgr/dde.cpp @@ -108,7 +108,7 @@ static LRESULT CALLBACK DdeMessageWindow(HWND hwnd,UINT msg,WPARAM wParam,LPARAM TCHAR *pszCommand; DDEACK ack; ZeroMemory(&ack,sizeof(ack)); - if(UnpackDDElParam(msg,lParam,NULL,(PUINT)&hCommand)) { + if(UnpackDDElParam(msg,lParam,NULL,(PUINT_PTR)&hCommand)) { #if defined(_UNICODE) /* ANSI execute command can't happen for shell */ if(IsWindowUnicode((HWND)wParam)) { @@ -151,7 +151,7 @@ static LRESULT CALLBACK DdeMessageWindow(HWND hwnd,UINT msg,WPARAM wParam,LPARAM { ATOM hSzItem; DDEACK ack; ZeroMemory(&ack,sizeof(ack)); - if(UnpackDDElParam(msg,lParam,NULL,(PUINT)&hSzItem)) { + if(UnpackDDElParam(msg,lParam,NULL,(PUINT_PTR)&hSzItem)) { lParam=ReuseDDElParam(lParam,msg,WM_DDE_ACK,*(PUINT)&ack,(UINT)hSzItem); if (!PostMessage((HWND)wParam,WM_DDE_ACK,(WPARAM)hwnd,lParam)) { if(hSzItem) GlobalDeleteAtom(hSzItem); diff --git a/plugins/ExternalAPI/m_historyevents.h b/plugins/ExternalAPI/m_historyevents.h index aa44637861..71cf8fdcf1 100644 --- a/plugins/ExternalAPI/m_historyevents.h +++ b/plugins/ExternalAPI/m_historyevents.h @@ -209,7 +209,7 @@ Return: TRUE or FALSE -static int HistoryEvents_Register(char *module, char *name, char *description, int eventType, HICON defaultIcon, +static INT_PTR HistoryEvents_Register(char *module, char *name, char *description, int eventType, HICON defaultIcon, int supports, int flags, fGetHistoryEventText pfGetHistoryEventText) { HISTORY_EVENT_HANDLER heh = {0}; @@ -229,7 +229,7 @@ static int HistoryEvents_Register(char *module, char *name, char *description, i return CallService(MS_HISTORYEVENTS_REGISTER, (WPARAM) &heh, 0); } -static int HistoryEvents_RegisterWithTemplates(char *module, char *name, char *description, int eventType, HICON defaultIcon, +static INT_PTR HistoryEvents_RegisterWithTemplates(char *module, char *name, char *description, int eventType, HICON defaultIcon, int supports, int flags, fGetHistoryEventText pfGetHistoryEventText, char **templates, int numTemplates) { @@ -252,7 +252,7 @@ static int HistoryEvents_RegisterWithTemplates(char *module, char *name, char *d return CallService(MS_HISTORYEVENTS_REGISTER, (WPARAM) &heh, 0); } -static int HistoryEvents_RegisterMessageStyle(char *module, char *name, char *description, int eventType, HICON defaultIcon, +static INT_PTR HistoryEvents_RegisterMessageStyle(char *module, char *name, char *description, int eventType, HICON defaultIcon, int flags, char **templates, int numTemplates) { HISTORY_EVENT_HANDLER heh = {0}; diff --git a/plugins/NewAwaySysMod/NewAwaySys.vcxproj b/plugins/NewAwaySysMod/NewAwaySys.vcxproj index 8c570fe213..173cd418d0 100644 --- a/plugins/NewAwaySysMod/NewAwaySys.vcxproj +++ b/plugins/NewAwaySysMod/NewAwaySys.vcxproj @@ -230,7 +230,7 @@ - + diff --git a/plugins/NewAwaySysMod/NewAwaySys.vcxproj.filters b/plugins/NewAwaySysMod/NewAwaySys.vcxproj.filters index 7f7405f683..bb85b875dd 100644 --- a/plugins/NewAwaySysMod/NewAwaySys.vcxproj.filters +++ b/plugins/NewAwaySysMod/NewAwaySys.vcxproj.filters @@ -180,7 +180,7 @@ - + Resource Files diff --git a/plugins/NewXstatusNotify/main.cpp b/plugins/NewXstatusNotify/main.cpp index 033d89a45b..232fad10f2 100644 --- a/plugins/NewXstatusNotify/main.cpp +++ b/plugins/NewXstatusNotify/main.cpp @@ -34,8 +34,8 @@ MM_INTERFACE mmi = {0}; UTF8_INTERFACE utfi = {0}; LIST_INTERFACE li = {0}; -LIST eventList( 10, 0 ); -LIST xstatusList( 10, 0 ); +LIST eventList( 10 ); +LIST xstatusList( 10 ); HANDLE hEnableDisableMenu, hOptionsInitialize, hModulesLoaded, hUserInfoInitialise; HANDLE hContactSettingChanged, hHookContactStatusChanged, hContactStatusChanged; @@ -329,7 +329,6 @@ WCHAR *mir_dupToUnicodeEx(char *ptr, UINT CodePage) tmp = (WCHAR *) mir_alloc(size * sizeof(WCHAR)); MultiByteToWideChar(CodePage, 0, ptr, -1, tmp, size * sizeof(WCHAR)); - return tmp; } diff --git a/plugins/ProfileManager/pmanagerEx.c b/plugins/ProfileManager/pmanagerEx.c index f564d00849..8bc9fec652 100644 --- a/plugins/ProfileManager/pmanagerEx.c +++ b/plugins/ProfileManager/pmanagerEx.c @@ -8,14 +8,16 @@ There is no warranty. */ #define MIRANDA_VER 0x0A00 +#include #include + #include #include #include #include -#include -#include "resource.h" +#include +#include "resource.h" HINSTANCE hInst; PLUGINLINK *pluginLink; @@ -24,8 +26,6 @@ TCHAR lmn[MAX_PATH]; TCHAR* pathn; int hLangpack; -#define SIZEOF(x) (sizeof(x)/sizeof(*x)) - PLUGININFOEX pluginInfo={ sizeof(PLUGININFOEX), "Miranda IM Profile Changer", @@ -44,37 +44,42 @@ PLUGININFOEX pluginInfo={ }; +__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +{ + return &pluginInfo; +} + +/////////////////////////////////////////////////////////////////////////////// + BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) { hInst=hinstDLL; return TRUE; } -static int ChangePM(WPARAM wParam,LPARAM lParam) -{ - GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn)); - ShellExecute(0, "open", fn, "/FORCESHOW", "", 1); - CallService("CloseAction", 0, 0); - return 0; -} +/////////////////////////////////////////////////////////////////////////////// -static int LoadPM(WPARAM wParam,LPARAM lParam) +static const MUUID interfaces[] = {MIID_TESTPLUGIN, MIID_LAST}; +__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) { - GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn)); - ShellExecute(0, "open", fn, "/FORCESHOW", "", 1); - return 0; + return interfaces; } +/////////////////////////////////////////////////////////////////////////////// -__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +static INT_PTR ChangePM(WPARAM wParam,LPARAM lParam) { - return &pluginInfo; + GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn)); + ShellExecute(0, "open", fn, "/FORCESHOW", "", 1); + CallService("CloseAction", 0, 0); + return 0; } -static const MUUID interfaces[] = {MIID_TESTPLUGIN, MIID_LAST}; -__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) +static INT_PTR LoadPM(WPARAM wParam,LPARAM lParam) { - return interfaces; + GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn)); + ShellExecute(0, "open", fn, "/FORCESHOW", "", 1); + return 0; } int __declspec(dllexport) Load(PLUGINLINK *link) @@ -107,6 +112,8 @@ int __declspec(dllexport) Load(PLUGINLINK *link) return 0; } +/////////////////////////////////////////////////////////////////////////////// + int __declspec(dllexport) Unload(void) { return 0; diff --git a/plugins/Rate/commonheaders.h b/plugins/Rate/commonheaders.h index 34aeb65dff..56abcd36f4 100644 --- a/plugins/Rate/commonheaders.h +++ b/plugins/Rate/commonheaders.h @@ -27,7 +27,7 @@ #ifndef COMMHEADERS_H #define COMMHEADERS_H -//#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#define _CRT_SECURE_NO_WARNINGS //needed by m_utils.h #include diff --git a/plugins/Svc_crshdmp/utils.h b/plugins/Svc_crshdmp/utils.h index 06770ae9b5..b63e9f893a 100644 --- a/plugins/Svc_crshdmp/utils.h +++ b/plugins/Svc_crshdmp/utils.h @@ -15,6 +15,8 @@ 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, see . */ + +#define _CRT_SECURE_NO_WARNINGS #define MIRANDA_VER 0x0A00 #include -- cgit v1.2.3