Patch written by Peter Hater and Christoph von Wittich.
Slightly modified by me in order to
- fix bit-rot
- fix header include issues
- disable integration with dnsapi because of confusing use of DnsQweryEx().
Integration with dnsapi will follow in a future commit.
CORE-12159