GNU adns for Win32

Advanced, easy to use, asynchronous-capable DNS client library and utilities.

adns, originally written for Linux/UNIX by Ian Jackson, is a resolver library for C (and C++) programs. The Win32 version is tested on Windows 2000 professional. The library comes as a dll. The intention behind this port is to ease cross platform development of Internet server software.

Please see the adns website for general information about adns.

The latest version of this page can be found here.

Please report any bugs or problems with the Win32 version to

Current ported version

Supported compilers

The library is tested under Windows 2000, but should work with all versions from Windows NT 4 and up, and Windows98 and up. Windows95 is not supported. If you want to use the library in your own C/C++ project, you must set the following manifests before including adns.h:

#define ADNS_DLL

ADNS_MAP_UNIXAPI will enable the Win32 port in the header-files (else, they will use the defauts for a UNIX system)

ADNS_DLL will enable linking to the exported DLL functions. Currently I have only made the DLL available. There are two reasons for this: 

  1. The DNS protocol is a mess - and it's difficult to make a foolproof implementation. If a security-problem is found (or other bugs) - the fix can usually be deployed just by replacing the DLL. 
  2. The GPL/LGPL license of ADNS (see GPL-vs-LGPL) will allow you to use the .dll in your project - as far as I can tell. A statically linked version will only be allowed in GPL licensed projects.


Header file: adns.h
Library: adns_dll.lib or adns_dlld.lib
Other required libraries: C runtime libraries, Ws2_32.lib, Iphlpapi.lib

Bugs and suggestions


Copyright and licensing

adns for Win32 is Copyright 2000 - 2005 Jarle (jgaa) Aase, Copyright 1997-2005 Ian Jackson, Copyright 1999 Tony Finch, and Copyright (C) 1991 Massachusetts Institute of Technology.

adns for Win32 is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program and documentation is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with adns, or one should be available above; if not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, or email


This web page is Copyright (c)2000 - 2005 Jarle (jgaa) Aase and brought to you by Jgaa's Internet