summaryrefslogtreecommitdiff
path: root/MySpace/net.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'MySpace/net.cpp')
-rw-r--r--MySpace/net.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/MySpace/net.cpp b/MySpace/net.cpp
new file mode 100644
index 0000000..812c551
--- /dev/null
+++ b/MySpace/net.cpp
@@ -0,0 +1,20 @@
+#include "common.h"
+#include "net.h"
+
+HANDLE hNetlibUser = 0;
+
+void InitNetlib() {
+ NETLIBUSER nl_user = {0};
+ nl_user.cbSize = sizeof(nl_user);
+ nl_user.szSettingsModule = MODULE;
+ nl_user.flags = NUF_OUTGOING | NUF_HTTPCONNS;
+ nl_user.szDescriptiveName = MODULE;
+
+ hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nl_user);
+}
+
+void DeinitNetlib() {
+ if(hNetlibUser)
+ CallService(MS_NETLIB_CLOSEHANDLE, (WPARAM)hNetlibUser, 0);
+}
+