diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-06-23 12:40:13 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-06-23 12:40:13 +0000 |
commit | f6508c1a7ebc417aed838ce0d056c3c8c40f4376 (patch) | |
tree | 9cc5fa1cdcf83a055f9335b7c5d47bd6039e2bad /plugins/FirstRun/main.cpp | |
parent | 50fb93f0bd6075a0f3cfb77abfc5a3aa9d75a5a6 (diff) |
FirstRun:
renamed to .cpp
git-svn-id: http://svn.miranda-ng.org/main/trunk@545 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FirstRun/main.cpp')
-rw-r--r-- | plugins/FirstRun/main.cpp | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/plugins/FirstRun/main.cpp b/plugins/FirstRun/main.cpp new file mode 100644 index 0000000000..206d2cd518 --- /dev/null +++ b/plugins/FirstRun/main.cpp @@ -0,0 +1,67 @@ +#include "commonheaders.h"
+
+HINSTANCE hInst;
+PLUGINLINK *pluginLink;
+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/",
+ 0, //not transient
+ 0, //doesn't replace anything built-in
+ // Generate your own unique id for your plugin.
+ // Do not use this UUID!
+ // Use uuidgen.exe to generate the uuuid
+ MIID_FIRSTRUN
+};
+
+int ModulesLoaded(WPARAM wParam,LPARAM lParam)
+{
+ char* ptszDllName;
+ char ptszDllPath[MAX_PATH];
+
+ GetModuleFileName(hInst, ptszDllPath, MAX_PATH);
+ ptszDllName = _strlwr(strrchr(ptszDllPath, '\\'));
+
+ if (ptszDllName!=NULL)
+ ptszDllName=ptszDllName + 1;
+
+ CallService(MS_PROTO_SHOWACCMGR, (WPARAM) NULL, (LPARAM)NULL);
+ DBWriteContactSettingByte(NULL,"PluginDisable",ptszDllName,1);
+
+ return 0;
+}
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
+{
+ hInst=hinstDLL;
+ return TRUE;
+}
+
+
+__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+{
+ return &pluginInfo;
+}
+
+
+int __declspec(dllexport) Load(PLUGINLINK *link)
+{
+ pluginLink=link;
+ mir_getLP(&pluginInfo);
+ hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED,ModulesLoaded);
+ return 0;
+}
+
+int __declspec(dllexport) Unload(void)
+{
+ UnhookEvent(hModulesLoaded);
+ return 0;
+}
\ No newline at end of file |