summaryrefslogtreecommitdiff
path: root/plugins/ProfileManager/pmanagerEx.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ProfileManager/pmanagerEx.c')
-rw-r--r--plugins/ProfileManager/pmanagerEx.c47
1 files changed, 27 insertions, 20 deletions
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 <tchar.h>
#include <windows.h>
+
#include <newpluginapi.h>
#include <m_clist.h>
#include <m_skin.h>
#include <m_langpack.h>
-#include <tchar.h>
-#include "resource.h"
+#include <win2k.h>
+#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;