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/HTTPServer/src/Glob.h | 2 +- plugins/HTTPServer/src/main.cpp | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'plugins/HTTPServer') diff --git a/plugins/HTTPServer/src/Glob.h b/plugins/HTTPServer/src/Glob.h index c556f73786..7d21925204 100644 --- a/plugins/HTTPServer/src/Glob.h +++ b/plugins/HTTPServer/src/Glob.h @@ -60,7 +60,7 @@ using namespace std; extern HINSTANCE hInstance; -extern HANDLE hNetlibUser; +extern HNETLIBUSER hNetlibUser; extern bool bShutdownInProgress; bool bWriteConfigurationFile(); diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp index 3f52469e90..1f9c89dc22 100644 --- a/plugins/HTTPServer/src/main.cpp +++ b/plugins/HTTPServer/src/main.cpp @@ -45,7 +45,7 @@ const char* pszDefaultShares[] = { void ConnectionOpen(HANDLE hNewConnection, DWORD dwRemoteIP); int PreShutdown(WPARAM /*wparam*/, LPARAM /*lparam*/); -HANDLE hNetlibUser; +HNETLIBUSER hNetlibUser; HANDLE hDirectBoundPort; HINSTANCE hInstance = NULL; @@ -740,12 +740,11 @@ int MainInit(WPARAM /*wparam*/, LPARAM /*lparam*/) bWriteConfigurationFile(); } - NETLIBUSER nlu = { 0 }; - nlu.cbSize = sizeof(nlu); + NETLIBUSER nlu = {}; nlu.flags = NUF_OUTGOING | NUF_INCOMING; nlu.szSettingsModule = MODULE; nlu.szDescriptiveName = Translate("HTTP Server"); - hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)& nlu); + hNetlibUser = Netlib_RegisterUser(& nlu); if (!hNetlibUser) { MessageBox(NULL, "Failed to register NetLib user", MSG_BOX_TITEL, MB_OK); return 0; -- cgit v1.2.3