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/HTTPServer/src | |
parent | c8e1c429321ed8aa2efce0fc00b6dfd08f1b2735 (diff) |
strong typization - better typization
Diffstat (limited to 'plugins/HTTPServer/src')
-rw-r--r-- | plugins/HTTPServer/src/Glob.h | 2 | ||||
-rw-r--r-- | plugins/HTTPServer/src/main.cpp | 7 |
2 files changed, 4 insertions, 5 deletions
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;
|