diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-03-15 08:36:43 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-03-15 08:36:43 +0000 |
commit | a77e43825fdfe580ede909d4d48048e2d82c586e (patch) | |
tree | ca9b207e328fcc033cb4e3b2dd054f0b041e4b4d /plugins/Watrack_MPD/src/init.cpp | |
parent | f4a6ef4a01a6080678c0df1b5d7469d194003a7d (diff) |
added precompiled header
added version info
git-svn-id: http://svn.miranda-ng.org/main/trunk@4041 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Watrack_MPD/src/init.cpp')
-rwxr-xr-x | plugins/Watrack_MPD/src/init.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/plugins/Watrack_MPD/src/init.cpp b/plugins/Watrack_MPD/src/init.cpp index 13e0b85351..b01745c4dd 100755 --- a/plugins/Watrack_MPD/src/init.cpp +++ b/plugins/Watrack_MPD/src/init.cpp @@ -16,8 +16,6 @@ #include "commonheaders.h" -#define PLUGIN_NAME "Watrack_MPD" - HINSTANCE hInst; BOOL bWatrackService = FALSE; int hLangpack = 0; @@ -27,13 +25,13 @@ HANDLE ghNetlibUser; PLUGININFOEX pluginInfo={ sizeof(PLUGININFOEX), - PLUGIN_NAME, - PLUGIN_MAKE_VERSION(0,0,0,4), - "Music Player Daemon support for Watrack.", - "sss, others..", - "sss123next@list.ru", - "© 2009 sss, others...", - "http://sss.chaoslab.ru:81/tracker/mim_plugs/", + __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESCRIPTION,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
UNICODE_AWARE, // 692E87D0-6C71-4CDC-9E36-2B69FBDC4C {0x692e87d0, 0x6c71, 0x4cdc, {0x9e, 0x36, 0x2b, 0x2d, 0x69, 0xfb, 0xdc, 0x4c}} @@ -45,7 +43,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return TRUE; } -__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { return &pluginInfo; } @@ -61,15 +59,13 @@ void InitVars() static int OnModulesLoaded(WPARAM wParam, LPARAM lParam) { - HANDLE hHookOptionInit; NETLIBUSER nlu = {0}; nlu.cbSize = sizeof(nlu); nlu.flags = (NUF_OUTGOING | NUF_HTTPCONNS); nlu.szDescriptiveName = "Watrack MPD connection"; - nlu.szSettingsModule = PLUGIN_NAME; + nlu.szSettingsModule = __PLUGIN_NAME; ghNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu); InitVars(); - hHookOptionInit = HookEvent(ME_OPT_INITIALISE, WaMpdOptInit); if (ServiceExists("WATrack/Player")) bWatrackService = TRUE; RegisterPlayer(); @@ -77,14 +73,16 @@ static int OnModulesLoaded(WPARAM wParam, LPARAM lParam) return 0; } -int __declspec(dllexport) Load() +extern "C" __declspec(dllexport) int Load() { mir_getLP(&pluginInfo); HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); + HookEvent(ME_OPT_INITIALISE, WaMpdOptInit); + return 0; } -int __declspec(dllexport) Unload(void) +extern "C" __declspec(dllexport) int Unload(void) { free(gbHost); free(gbPassword); |