diff options
Diffstat (limited to 'isee_tweaker/main.c')
-rw-r--r-- | isee_tweaker/main.c | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/isee_tweaker/main.c b/isee_tweaker/main.c new file mode 100644 index 0000000..2894c25 --- /dev/null +++ b/isee_tweaker/main.c @@ -0,0 +1,84 @@ +/*
+Miranda IM ISee Tweaker plugin
+Copyright (C) 2005 Sergey V. Gershovich
+
+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 <windows.h>
+#include "isee_tweaker.h"
+
+#include "../../include/newpluginapi.h"
+#include "../../include/m_system.h"
+#include "../../include/m_langpack.h"
+#include "../../include/m_options.h"
+#include "../../include/m_database.h"
+//#include "../../include/m_clist.h"
+#pragma hdrstop
+
+
+// Switch off all unnecessary in Release Build.
+// to decrease dll size
+#ifdef NDEBUG
+ #pragma comment(linker,"/MERGE:.rdata=.text")
+ #pragma comment(linker,"/FILEALIGN:512 /SECTION:.text,EWRX /IGNORE:4078")
+ #pragma comment(linker,"/ENTRY:DllMain")
+ #pragma comment(linker,"/NODEFAULTLIB")
+#endif
+
+HINSTANCE hInst;
+PLUGINLINK *pluginLink;
+
+MIRANDAHOOK hHookOptionInit = NULL;
+//MIRANDAHOOK hEventOkToExit = NULL;
+
+
+PLUGININFO pluginInfo={ // about plugin
+ sizeof(PLUGININFO),
+ ModuleName,
+ PLUGIN_MAKE_VERSION(0,1,0,0),
+ "This plugin can tweak some hidden ISee settings",
+ "Sergey V. Gershovich a.k.a. Jazzy$",
+ "sir-jazzy@yandex.ru",
+ "© 2005 Jazzy$",
+ "http://jazzy.ws/miranda/",
+ 0, 0
+};
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
+{// plugin entry point
+ hInst=hinstDLL;
+ DisableThreadLibraryCalls(hInst);
+ return TRUE;
+}
+//==========================================================================
+__declspec(dllexport) PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion)
+{// Tell Miranda IM about plugin
+ return &pluginInfo;
+}
+
+int __declspec(dllexport) Load(PLUGINLINK *link)
+{// on load: create services, hook events... if need :)
+ pluginLink = link;
+ hHookOptionInit = HookEvent(ME_OPT_INITIALISE,OptInitialise);
+ return 0;
+}
+
+int __declspec(dllexport) Unload(void)
+{ //on unload: unhook hooked events... if need :)
+ if (hHookOptionInit)
+ UnhookEvent(hHookOptionInit);
+ return 0;
+}
\ No newline at end of file |