If the method succeeds, the length of the information buffer is
returned. A return value of zero indicates that no information for
that record is available for the specified host. If the method fails,
the return value is DNS_ERROR. To get extended error information,
call GetLastError.
The GetRecord method can be used to resolve a host name
into an IP address using the record type DNS_RECORD_ADDRESS. It can
also be used to perform a reverse lookup and resolve an IP address
into a host name by using the record type DNS_RECORD_PTR.
To determine the host that serves as the primary or master DNS for
a zone, the record name should be specified as the domain name (e.g.:
microsoft.com) and the record type should be DNS_RECORD_SOA. The
value returned will the fully qualified domain name for host.
Note that this method does not reference a local host file when
resolving host names or addresses. If the record lookup fails, this
method will return an error even if there's an entry for the host in
the file that has been specified by a call to SetHostFile.