diff options
author | George Hazan <ghazan@miranda.im> | 2017-01-11 22:23:57 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-01-11 22:24:06 +0300 |
commit | d958e3fb847813075cc059bd5a7aa28252982268 (patch) | |
tree | d9c02a7ddee830628248219e9c83c7de3c335140 /plugins/Ping | |
parent | c8e1c429321ed8aa2efce0fc00b6dfd08f1b2735 (diff) |
strong typization - better typization
Diffstat (limited to 'plugins/Ping')
-rw-r--r-- | plugins/Ping/src/ping.cpp | 7 | ||||
-rw-r--r-- | plugins/Ping/src/stdafx.h | 2 |
2 files changed, 4 insertions, 5 deletions
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<PINGADDRESS> PINGLIST; typedef std::list<PINGADDRESS>::iterator pinglist_it;
-extern HANDLE hNetlibUser;
+extern HNETLIBUSER hNetlibUser;
extern HINSTANCE hInst;
extern bool use_raw_ping;
|