Please note that Firewalls and anti malware software detects (and depending on company policies even blocks) DNS_ANY requests.
In that case the usage of this function fails.
This is because DNS_ANY requests can be exploited for creating "amplification (D)DOS attackes": You send 1 DNS_ANY request and get a huge amount of information back, thus even small requests can result into hugh network load.
I advise to use a more explicit name-request instead of using DNS_ANY.