diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-07-18 07:52:13 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-07-18 07:52:13 +0000 |
commit | 70d04c9b21955c34070ee466693403e2b00870e1 (patch) | |
tree | a891633004c655fbc3448803cffa0d62855409d0 /plugins/FirstRun/src | |
parent | 2b556a0908dfa1c12400ec9ac22a00b39bc17136 (diff) |
FirstRun, FlashAvatars, FloatingContacts: changed folder structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@1008 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FirstRun/src')
-rw-r--r-- | plugins/FirstRun/src/commonheaders.h | 11 | ||||
-rw-r--r-- | plugins/FirstRun/src/main.cpp | 62 |
2 files changed, 73 insertions, 0 deletions
diff --git a/plugins/FirstRun/src/commonheaders.h b/plugins/FirstRun/src/commonheaders.h new file mode 100644 index 0000000000..1839f53fc1 --- /dev/null +++ b/plugins/FirstRun/src/commonheaders.h @@ -0,0 +1,11 @@ +#define MIRANDA_VER 0x0A00
+#define _CRT_SECURE_NO_WARNINGS
+
+#include <windows.h>
+#include <newpluginapi.h>
+#include <m_langpack.h>
+#include <m_system.h>
+#include <m_protocols.h>
+#include <m_database.h>
+
+#define MIID_FIRSTRUN {0x49c2cf54, 0x7898, 0x44de, { 0xbe, 0x3a, 0x6d, 0x2e, 0x4e, 0xf9, 0x0, 0x79 }} //{49c2cf54-7898-44de-be3a-6d2e4ef90079}
\ No newline at end of file diff --git a/plugins/FirstRun/src/main.cpp b/plugins/FirstRun/src/main.cpp new file mode 100644 index 0000000000..cbe3b18f9d --- /dev/null +++ b/plugins/FirstRun/src/main.cpp @@ -0,0 +1,62 @@ +#include "commonheaders.h"
+
+HINSTANCE hInst;
+
+HANDLE hModulesLoaded;
+int hLangpack;
+
+PLUGININFOEX pluginInfo={
+ sizeof(PLUGININFOEX),
+ "First Run Plugin",
+ PLUGIN_MAKE_VERSION(0,0,0,2),
+ "Displays the Accounts window at the first start.",
+ "Yasnovidyashii",
+ "yasnovidyashii@gmail.com",
+ "© 2008 Mikhail Yuriev",
+ "http://miranda-im.org/",
+ UNICODE_AWARE,
+ MIID_FIRSTRUN
+};
+
+int ModulesLoaded(WPARAM wParam,LPARAM lParam)
+{
+ TCHAR* ptszDllName;
+ TCHAR ptszDllPath[MAX_PATH];
+
+ GetModuleFileName(hInst, ptszDllPath, MAX_PATH);
+ ptszDllName = _tcslwr(_tcsrchr(ptszDllPath, '\\'));
+
+ if (ptszDllName!=NULL)
+ ptszDllName=ptszDllName + 1;
+
+ CallService(MS_PROTO_SHOWACCMGR, (WPARAM) NULL, (LPARAM)NULL);
+
+ DBWriteContactSettingByte(NULL, "PluginDisable", _T2A(ptszDllName), 1);
+
+ return 0;
+}
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
+{
+ hInst=hinstDLL;
+ return TRUE;
+}
+
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+{
+ return &pluginInfo;
+}
+
+extern "C" __declspec(dllexport) int Load(void)
+{
+
+ mir_getLP(&pluginInfo);
+ hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED,ModulesLoaded);
+ return 0;
+}
+
+extern "C" __declspec(dllexport) int Unload(void)
+{
+ UnhookEvent(hModulesLoaded);
+ return 0;
+}
\ No newline at end of file |