summaryrefslogtreecommitdiff
path: root/plugins/CryptoPP
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/CryptoPP')
-rw-r--r--plugins/CryptoPP/src/commonheaders.h2
-rw-r--r--plugins/CryptoPP/src/main.cpp10
2 files changed, 5 insertions, 7 deletions
diff --git a/plugins/CryptoPP/src/commonheaders.h b/plugins/CryptoPP/src/commonheaders.h
index 3da70a4494..ff27ce934c 100644
--- a/plugins/CryptoPP/src/commonheaders.h
+++ b/plugins/CryptoPP/src/commonheaders.h
@@ -74,7 +74,7 @@ std::string base64decode(const std::string&);
std::string base64decode(const char *);
#if defined(_DEBUG) || defined(NETLIB_LOG)
-extern HANDLE hNetlibUser;
+extern HNETLIBUSER hNetlibUser;
void InitNetlib();
void DeinitNetlib();
int Sent_NetLog(const char *,...);
diff --git a/plugins/CryptoPP/src/main.cpp b/plugins/CryptoPP/src/main.cpp
index 62a75b02b3..3b2c814f29 100644
--- a/plugins/CryptoPP/src/main.cpp
+++ b/plugins/CryptoPP/src/main.cpp
@@ -115,17 +115,15 @@ size_t rtrim(LPCSTR str)
#if defined(_DEBUG) || defined(NETLIB_LOG)
-HANDLE hNetlibUser;
+HNETLIBUSER hNetlibUser;
void InitNetlib()
{
- NETLIBUSER nl_user;
- memset(&nl_user, 0, sizeof(nl_user));
- nl_user.cbSize = sizeof(nl_user);
+ NETLIBUSER nl_user = {};
nl_user.szSettingsModule = (LPSTR)szModuleName;
nl_user.szDescriptiveName = (LPSTR)szModuleName;
nl_user.flags = NUF_NOOPTIONS;
- hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nl_user);
+ hNetlibUser = Netlib_RegisterUser(&nl_user);
}
void DeinitNetlib()
@@ -142,7 +140,7 @@ int Sent_NetLog(const char *fmt, ...)
mir_vsnprintf(szText, sizeof(szText), fmt, va);
va_end(va);
if (hNetlibUser)
- return CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, (LPARAM)szText);
+ return Netlib_Log(hNetlibUser, szText);
return 0;
}
#endif