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/ProfileManager/pmanagerEx.c | 47 +++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 20 deletions(-) (limited to 'plugins/ProfileManager') 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; -- cgit v1.2.3