DnsQueryEx

[DllImport("dnsapi.dll", SetLastError = true, CharSet = CharSet.Unicode)]
public static extern int DnsQueryEx(
   ref DNS_QUERY_REQUEST pQueryRequest,
   ref DNS_QUERY_RESULT pQueryResults,
   IntPtr pQueryCancel
);

Microsoft documentation: Link

Last updated