summaryrefslogtreecommitdiff
path: root/MirandaPlugin/Templates/1033/net.cpp
diff options
context:
space:
mode:
authorsje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-02-02 14:17:26 +0000
committersje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2007-02-02 14:17:26 +0000
commit8029b70725875a41ee394aabcbe4d39b658a6364 (patch)
tree5067e677504c641d23deaca9d0553b263f91bca2 /MirandaPlugin/Templates/1033/net.cpp
parentb75d91b2249acd062d80bfccdb66e8d25284ad9c (diff)
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@107 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'MirandaPlugin/Templates/1033/net.cpp')
-rw-r--r--MirandaPlugin/Templates/1033/net.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/MirandaPlugin/Templates/1033/net.cpp b/MirandaPlugin/Templates/1033/net.cpp
new file mode 100644
index 0000000..e7beb8a
--- /dev/null
+++ b/MirandaPlugin/Templates/1033/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 = "Updater";
+
+ hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nl_user);
+}
+
+void DeinitNetlib() {
+ if(hNetlibUser)
+ CallService(MS_NETLIB_CLOSEHANDLE, (WPARAM)hNetlibUser, 0);
+}
+