From 0ff1d601dfadfd19e286c021fd1288e8b8b4b7c2 Mon Sep 17 00:00:00 2001 From: sje Date: Tue, 31 Jul 2007 05:07:21 +0000 Subject: use yapp api for popup classes use fontservice for fame background colour add beta changelog url link to svn log use IPHLPAPI.dll if available, and use only one icmp file handle git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@316 4f64403b-2f21-0410-a795-97e2b3489a10 --- ping/ping.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'ping/ping.cpp') diff --git a/ping/ping.cpp b/ping/ping.cpp index b5fba5c..9623fcd 100644 --- a/ping/ping.cpp +++ b/ping/ping.cpp @@ -13,7 +13,7 @@ bool use_raw_ping = true; PLUGININFOEX pluginInfo={ sizeof(PLUGININFOEX), "Ping Plugin", - PLUGIN_MAKE_VERSION(0, 8, 0, 2), + PLUGIN_MAKE_VERSION(0, 9, 1, 0), "Ping labelled IP addresses or domain names.", "Scott Ellis", "mail@scottellis.com.au", @@ -27,6 +27,7 @@ PLUGININFOEX pluginInfo={ extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) { hInst=hinstDLL; + DisableThreadLibraryCalls(hInst); return TRUE; } @@ -87,7 +88,7 @@ int OnShutdown(WPARAM wParam, LPARAM lParam) { if(use_raw_ping) cleanup_raw_ping(); else - ICMP::get_instance()->stop(); + ICMP::cleanup(); DeinitList(); @@ -105,6 +106,7 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam) { update.szComponentName = pluginInfo.shortName; update.pbVersion = (BYTE *)CreateVersionString(pluginInfo.version, szVersion); update.cpbVersion = strlen((char *)update.pbVersion); + update.szBetaChangelogURL = "https://server.scottellis.com.au/websvn/log.php?repname=Miranda+Plugins&path=%2Fping%2F&rev=0&sc=0&isdir=1"; update.szUpdateURL = UPDATER_AUTOREGISTER; @@ -121,6 +123,8 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam) { CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update); } + + NETLIBUSER nl_user = {0}; nl_user.cbSize = sizeof(nl_user); nl_user.szSettingsModule = PLUG; @@ -136,7 +140,7 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam) { hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nl_user); - InitIcons(); + InitUtils(); InitMenus(); @@ -164,11 +168,11 @@ extern "C" PING_API int Load(PLUGINLINK *link) { pluginLink=link; - if(init_raw_ping()) { + //if(init_raw_ping()) { //MessageBox(0, Translate("Failed to initialize. Plugin disabled."), Translate("Ping Plugin"), MB_OK | MB_ICONERROR); //return 1; use_raw_ping = false; - } + //} DBWriteContactSettingByte(0, PLUG, "UsingRawSockets", (BYTE)use_raw_ping); DuplicateHandle( GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &mainThread, THREAD_SET_CONTEXT, FALSE, 0 ); @@ -204,6 +208,8 @@ extern "C" PING_API int Unload(void) DeleteCriticalSection(&thread_finished_cs); DeleteCriticalSection(&list_changed_cs); DeleteCriticalSection(&data_list_cs); + + DeinitUtils(); CloseHandle( mainThread ); -- cgit v1.2.3