aboutsummaryrefslogtreecommitdiff
path: root/src/gns/w32nsp-uninstall.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gns/w32nsp-uninstall.c')
-rw-r--r--src/gns/w32nsp-uninstall.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/gns/w32nsp-uninstall.c b/src/gns/w32nsp-uninstall.c
new file mode 100644
index 0000000..bb8db66
--- /dev/null
+++ b/src/gns/w32nsp-uninstall.c
@@ -0,0 +1,30 @@
+#define INITGUID
+#include <windows.h>
+#include <nspapi.h>
+#include <ws2spi.h>
+#include "gnunet_w32nsp_lib.h"
+#include <stdio.h>
+
+int
+main (int argc, char **argv)
+{
+ int ret;
+ GUID id = GNUNET_NAMESPACE_PROVIDER_DNS;
+ WSADATA wsd;
+
+ if (WSAStartup(MAKEWORD(2,2), &wsd) != 0)
+ {
+ fprintf (stderr, "WSAStartup() failed: %lu\n", GetLastError());
+ return 5;
+ }
+
+ ret = WSCUnInstallNameSpace (&id);
+ if (ret == NO_ERROR)
+ {
+ WSACleanup ();
+ return 0;
+ }
+ fprintf (stderr, "WSCUnInstallNameSpace() failed: %lu\n", GetLastError ());
+ WSACleanup ();
+ return 1;
+} \ No newline at end of file