-updated libcurl API, do IPv4/IPv6 with separate sockets
[oweals/gnunet.git] / src / gns / w32nsp-uninstall.c
1 #define INITGUID
2 #include <windows.h>
3 #include <nspapi.h>
4 #include <ws2spi.h>
5 #include "gnunet_w32nsp_lib.h"
6 #include <stdio.h>
7
8 int
9 main (int argc, char **argv)
10 {
11   int ret;
12   GUID id = GNUNET_NAMESPACE_PROVIDER_DNS;
13   WSADATA wsd;
14
15   if (WSAStartup(MAKEWORD(2,2), &wsd) != 0)
16   {
17     fprintf (stderr, "WSAStartup() failed: %lu\n", GetLastError());
18     return 5;
19   }
20
21   ret = WSCUnInstallNameSpace (&id);
22   if (ret == NO_ERROR)
23   {
24     WSACleanup ();
25     return 0;
26   }
27   fprintf (stderr, "WSCUnInstallNameSpace() failed: %lu\n", GetLastError ());
28   WSACleanup ();
29   return 1;
30 }