From d958e3fb847813075cc059bd5a7aa28252982268 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 11 Jan 2017 22:23:57 +0300 Subject: strong typization - better typization --- plugins/Ping/src/ping.cpp | 7 +++---- plugins/Ping/src/stdafx.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'plugins/Ping') diff --git a/plugins/Ping/src/ping.cpp b/plugins/Ping/src/ping.cpp index 8c7f9497ab..45096e79c7 100644 --- a/plugins/Ping/src/ping.cpp +++ b/plugins/Ping/src/ping.cpp @@ -4,7 +4,7 @@ CLIST_INTERFACE *pcli; HINSTANCE hInst; int hLangpack = 0; -HANDLE hNetlibUser = 0; +HNETLIBUSER hNetlibUser = 0; HANDLE hFillListEvent = 0; bool use_raw_ping = true; @@ -83,8 +83,7 @@ int OnShutdown(WPARAM, LPARAM) { int OnModulesLoaded(WPARAM, LPARAM) { - NETLIBUSER nl_user = { 0 }; - nl_user.cbSize = sizeof(nl_user); + NETLIBUSER nl_user = {}; nl_user.szSettingsModule = PLUG; nl_user.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE; nl_user.ptszDescriptiveName = TranslateT("Ping Plugin"); @@ -94,7 +93,7 @@ int OnModulesLoaded(WPARAM, LPARAM) nl_user.pfnHttpGatewayWrapSend = 0; nl_user.pfnHttpGatewayUnwrapRecv = 0; - hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nl_user); + hNetlibUser = Netlib_RegisterUser(&nl_user); InitUtils(); diff --git a/plugins/Ping/src/stdafx.h b/plugins/Ping/src/stdafx.h index 1e92a443d8..7bdfa5be69 100644 --- a/plugins/Ping/src/stdafx.h +++ b/plugins/Ping/src/stdafx.h @@ -107,7 +107,7 @@ typedef std::list PINGLIST; typedef std::list::iterator pinglist_it; -extern HANDLE hNetlibUser; +extern HNETLIBUSER hNetlibUser; extern HINSTANCE hInst; extern bool use_raw_ping; -- cgit v1.2.3