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/SmileyAdd/src/download.cpp | 6 +++--- plugins/SmileyAdd/src/smileys.cpp | 4 ++-- plugins/SmileyAdd/src/stdafx.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/SmileyAdd/src') diff --git a/plugins/SmileyAdd/src/download.cpp b/plugins/SmileyAdd/src/download.cpp index 1a68a8c86b..dd5e1e05a2 100644 --- a/plugins/SmileyAdd/src/download.cpp +++ b/plugins/SmileyAdd/src/download.cpp @@ -18,7 +18,7 @@ along with this program. If not, see . #include "stdafx.h" -HANDLE hNetlibUser; +HNETLIBUSER hNetlibUser; static HANDLE hFolder; struct QueueElem @@ -218,11 +218,11 @@ void GetSmileyCacheFolder(void) void DownloadInit(void) { - NETLIBUSER nlu = { sizeof(nlu) }; + NETLIBUSER nlu = {}; nlu.flags = NUF_OUTGOING | NUF_HTTPCONNS | NUF_NOHTTPSOPTION | NUF_UNICODE; nlu.szSettingsModule = MODULENAME; nlu.ptszDescriptiveName = TranslateT("SmileyAdd HTTP connections"); - hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu); + hNetlibUser = Netlib_RegisterUser(&nlu); GetSmileyCacheFolder(); g_hDlMutex = CreateMutex(NULL, FALSE, NULL); diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index 09066d74f0..65b8ed9564 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -520,7 +520,7 @@ bool SmileyPackType::LoadSmileyFileMSL(CMStringW &tbuf, bool onlyInfo, CMStringW static const wchar_t errmsg[] = LPGENW("Smiley #%u in file %s for smiley pack %s not found."); wchar_t msgtxt[1024]; mir_snwprintf(msgtxt, TranslateW(errmsg), smnum, resname.c_str(), modpath.c_str()); - CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, _T2A(msgtxt)); + Netlib_LogW(hNetlibUser, msgtxt); errorFound = true; } smnum++; @@ -1078,7 +1078,7 @@ SmileyLookup::SmileyLookup(const CMStringW &str, const bool regexs, const int in } if (!m_valid) - CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, _T2A(msgtxt)); + Netlib_LogW(hNetlibUser, msgtxt); } else { m_text = str; diff --git a/plugins/SmileyAdd/src/stdafx.h b/plugins/SmileyAdd/src/stdafx.h index f467be8697..754d4078db 100644 --- a/plugins/SmileyAdd/src/stdafx.h +++ b/plugins/SmileyAdd/src/stdafx.h @@ -92,7 +92,7 @@ typedef WCMatcher _TMatcher; extern FI_INTERFACE *fei; extern HINSTANCE g_hInst; -extern HANDLE hNetlibUser; +extern HNETLIBUSER hNetlibUser; extern HANDLE hEvent1; extern HGENMENU hContactMenuItem; extern SmileyCategoryListType g_SmileyCategories; -- cgit v1.2.3