From f6508c1a7ebc417aed838ce0d056c3c8c40f4376 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 23 Jun 2012 12:40:13 +0000 Subject: FirstRun: renamed to .cpp git-svn-id: http://svn.miranda-ng.org/main/trunk@545 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/FirstRun/main.c | 67 ----------------------------------------------- plugins/FirstRun/main.cpp | 67 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 67 deletions(-) delete mode 100644 plugins/FirstRun/main.c create mode 100644 plugins/FirstRun/main.cpp (limited to 'plugins/FirstRun') diff --git a/plugins/FirstRun/main.c b/plugins/FirstRun/main.c deleted file mode 100644 index 206d2cd518..0000000000 --- a/plugins/FirstRun/main.c +++ /dev/null @@ -1,67 +0,0 @@ -#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 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 -- cgit v1.2.3