summaryrefslogtreecommitdiff
path: root/MySpace/net.cpp
diff options
context:
space:
mode:
authorsje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-06-27 17:05:05 +0000
committersje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-06-27 17:05:05 +0000
commitcbd22101bcff041e598aba668412d0a4232b58e3 (patch)
tree984f7afe9ec9246719e185288f8a2e96f4bc0665 /MySpace/net.cpp
parent353f66dee3f468aaf7cc0d0ab314df89ae56c428 (diff)
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@217 4f64403b-2f21-0410-a795-97e2b3489a10
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);
+}
+