Vanara.PInvoke.DnsApi
4.2.1
Prefix Reserved
dotnet add package Vanara.PInvoke.DnsApi --version 4.2.1
NuGet\Install-Package Vanara.PInvoke.DnsApi -Version 4.2.1
<PackageReference Include="Vanara.PInvoke.DnsApi" Version="4.2.1" />
<PackageVersion Include="Vanara.PInvoke.DnsApi" Version="4.2.1" />
<PackageReference Include="Vanara.PInvoke.DnsApi" />
paket add Vanara.PInvoke.DnsApi --version 4.2.1
#r "nuget: Vanara.PInvoke.DnsApi, 4.2.1"
#:package Vanara.PInvoke.DnsApi@4.2.1
#addin nuget:?package=Vanara.PInvoke.DnsApi&version=4.2.1
#tool nuget:?package=Vanara.PInvoke.DnsApi&version=4.2.1
![]()
Vanara.PInvoke.DnsApi NuGet Package
PInvoke API (methods, structures and constants imported from Windows DnsApi.dll.
What is Vanara?
Vanara is a community project that contains various .NET assemblies which have P/Invoke functions, interfaces, enums and structures from Windows libraries. Each assembly is associated with one or a few tightly related libraries.
Issues?
First check if it's already fixed by trying the MyGet build. If you're still running into problems, file an issue.
Included in Vanara.PInvoke.DnsApi
| Functions | Enumerations | Structures |
|---|---|---|
| DnsAcquireContextHandle_ DnsCancelQuery DnsCancelQueryRaw DnsExtractRecordsFromMessage_W DnsFree DnsFreeCustomServers DnsFreeProxyName DnsGetApplicationSettings DnsGetCacheDataTable DnsGetProxyInformation DnsModifyRecordsInSet_ DnsNameCompare_ DnsQuery_ DnsQueryConfig DnsQueryEx DnsQueryRaw DnsQueryRawResultFree DnsRecordCompare DnsRecordCopyEx DnsRecordSetCompare DnsRecordSetCopyEx DnsRecordSetDetach DnsReleaseContextHandle DnsReplaceRecordSet DnsServiceBrowse DnsServiceBrowseCancel DnsServiceConstructInstance DnsServiceCopyInstance DnsServiceDeRegister DnsServiceFreeInstance DnsServiceRegister DnsServiceRegisterCancel DnsServiceResolve DnsServiceResolveCancel DnsSetApplicationSettings DnsStartMulticastQuery DnsStopMulticastQuery DnsValidateName_ DnsValidateServerStatus DnsWriteQuestionToBuffer_W | ATMA DNS_APP_SETTINGSF DNS_CHARSET DNS_CLASS DNS_CONFIG_FLAG DNS_CONFIG_TYPE DNS_CUSTOM_SERVER_FLAGS DNS_CUSTOM_SERVER_TYPE DNS_FREE_TYPE DNS_NAME_FORMAT DNS_OPCODE DNS_PROTOCOL DNS_PROXY_INFORMATION_TYPE DNS_QUERY_OPTIONS DNS_RCODE DNS_SECTION DNS_TKEY_MODE DNS_TYPE DNS_UPDATE DNS_WINS_FLAG DnsServerStatus | DNS_A_DATA DNS_AAAA_DATA DNS_ADDR DNS_ADDR_ARRAY DNS_APPLICATION_SETTINGS DNS_ATMA_DATA DNS_CACHE_ENTRY DNS_CUSTOM_SERVER DNS_DHCID_DATA DNS_DS_DATA DNS_HEADER DNS_KEY_DATA DNS_LOC_DATA DNS_MESSAGE_BUFFER DNS_MINFO_DATA DNS_MX_DATA DNS_NAPTR_DATA DNS_NSEC_DATA DNS_NSEC3_DATA DNS_NSEC3PARAM_DATA DNS_NULL_DATA DNS_NXT_DATA DNS_OPT_DATA DNS_PROXY_INFORMATION DNS_PTR_DATA DNS_QUERY_CANCEL DNS_QUERY_RAW_CANCEL DNS_QUERY_RAW_REQUEST DNS_QUERY_RAW_RESULT DNS_QUERY_REQUEST DNS_QUERY_REQUEST3 DNS_QUERY_RESULT DNS_RECORD DNS_RECORD_FLAGS DNS_RRSET DNS_SERVICE_BROWSE_REQUEST DNS_SERVICE_CANCEL DNS_SERVICE_INSTANCE DNS_SERVICE_REGISTER_REQUEST DNS_SERVICE_RESOLVE_REQUEST DNS_SIG_DATA DNS_SOA_DATA DNS_SRV_DATA DNS_TKEY_DATA DNS_TLSA_DATA DNS_TSIG_DATA DNS_TXT_DATA DNS_UNKNOWN_DATA DNS_WINS_DATA DNS_WINSR_DATA DNS_WIRE_QUESTION DNS_WIRE_RECORD DNS_WKS_DATA IP4_ARRAY MDNS_QUERY_HANDLE MDNS_QUERY_REQUEST HDNSCONTEXT DNS_SERVICE_BROWSE_REQUEST_CALLBACK |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net8.0-windows7.0 is compatible. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net9.0-windows7.0 is compatible. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- Microsoft.Win32.Registry (>= 5.0.0)
- System.Security.AccessControl (>= 6.0.1)
- Vanara.Core (>= 4.2.1)
- Vanara.PInvoke.Ws2_32 (>= 4.2.1)
-
.NETFramework 4.8
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Memory (>= 4.5.5)
- Vanara.Core (>= 4.2.1)
- Vanara.PInvoke.Ws2_32 (>= 4.2.1)
-
.NETStandard 2.0
- Microsoft.Win32.Registry (>= 5.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Memory (>= 4.5.5)
- System.Security.AccessControl (>= 6.0.1)
- System.ValueTuple (>= 4.6.1)
- Vanara.Core (>= 4.2.1)
- Vanara.PInvoke.Ws2_32 (>= 4.2.1)
-
.NETStandard 2.1
- Microsoft.Win32.Registry (>= 5.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Memory (>= 4.5.5)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
- System.Security.AccessControl (>= 6.0.1)
- Vanara.Core (>= 4.2.1)
- Vanara.PInvoke.Ws2_32 (>= 4.2.1)
-
net5.0
- Microsoft.Win32.Registry (>= 5.0.0)
- System.Security.AccessControl (>= 6.0.1)
- Vanara.Core (>= 4.2.1)
- Vanara.PInvoke.Ws2_32 (>= 4.2.1)
-
net6.0
- Microsoft.Win32.Registry (>= 5.0.0)
- System.Security.AccessControl (>= 6.0.1)
- Vanara.Core (>= 4.2.1)
- Vanara.PInvoke.Ws2_32 (>= 4.2.1)
-
net7.0
- Microsoft.Win32.Registry (>= 5.0.0)
- System.Security.AccessControl (>= 6.0.1)
- Vanara.Core (>= 4.2.1)
- Vanara.PInvoke.Ws2_32 (>= 4.2.1)
-
net8.0-windows7.0
- Vanara.Core (>= 4.2.1)
- Vanara.PInvoke.Ws2_32 (>= 4.2.1)
-
net9.0-windows7.0
- Vanara.Core (>= 4.2.1)
- Vanara.PInvoke.Ws2_32 (>= 4.2.1)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Vanara.PInvoke.DnsApi:
| Package | Downloads |
|---|---|
|
Vanara.Library
The full set of packages associated with the Vanara PInvoke Libraries. |
|
|
Vanara.Net
Abstracted classes around Win32 networking functions to provide simplified and object-oriented access to key networking capabilities like DNS, DHCP, filtering, access, and discovery. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.2.1 | 417 | 9/9/2025 |
| 4.2.0 | 247 | 8/25/2025 |
| 4.1.6 | 259 | 6/20/2025 |
| 4.1.5 | 200 | 6/20/2025 |
| 4.1.4 | 260 | 6/7/2025 |
| 4.1.3 | 373 | 4/24/2025 |
| 4.1.2 | 351 | 4/16/2025 |
| 4.1.1 | 452 | 3/7/2025 |
| 4.1.0 | 378 | 3/7/2025 |
| 4.0.6 | 256 | 2/24/2025 |
| 4.0.5 | 245 | 2/8/2025 |
| 4.0.4 | 3,092 | 9/13/2024 |
| 4.0.3 | 425 | 8/5/2024 |
| 4.0.2 | 307 | 6/24/2024 |
| 4.0.1 | 628 | 4/30/2024 |
| 4.0.0 | 323 | 3/29/2024 |
| 4.0.0-beta2 | 324 | 1/22/2024 |
| 4.0.0-beta | 257 | 11/20/2023 |
| 3.4.17 | 1,003 | 10/18/2023 |
| 3.4.16 | 1,562 | 8/7/2023 |
| 3.4.15 | 645 | 5/18/2023 |
| 3.4.14 | 455 | 4/15/2023 |
| 3.4.13 | 1,125 | 2/4/2023 |
| 3.4.12 | 773 | 1/15/2023 |
| 3.4.11 | 1,589 | 11/15/2022 |
| 3.4.10 | 1,070 | 10/25/2022 |
| 3.4.9 | 1,085 | 10/3/2022 |
| 3.4.8 | 1,129 | 9/16/2022 |
| 3.4.7 | 878 | 9/3/2022 |
| 3.4.6 | 946 | 8/7/2022 |
| 3.4.5 | 969 | 7/17/2022 |
| 3.4.4 | 2,152 | 7/5/2022 |
| 3.4.3 | 971 | 6/14/2022 |
| 3.4.2 | 954 | 5/13/2022 |
| 3.4.1 | 957 | 5/5/2022 |
| 3.4.0 | 1,054 | 3/14/2022 |
| 3.3.15 | 1,188 | 12/27/2021 |
| 3.3.14 | 739 | 10/26/2021 |
| 3.3.13 | 753 | 9/30/2021 |
| 3.3.12 | 699 | 8/30/2021 |
| 3.3.11 | 719 | 7/22/2021 |
| 3.3.10 | 2,143 | 6/4/2021 |
| 3.3.9 | 738 | 5/7/2021 |
| 3.3.8 | 792 | 4/7/2021 |
| 3.3.7 | 737 | 3/24/2021 |
| 3.3.6 | 798 | 3/19/2021 |
| 3.3.5 | 725 | 3/1/2021 |
| 3.3.4 | 730 | 2/11/2021 |
| 3.3.3 | 684 | 2/3/2021 |
| 3.3.2 | 762 | 1/21/2021 |
| 3.3.1 | 811 | 1/20/2021 |
| 3.3.0 | 1,329 | 11/20/2020 |
| 3.2.21 | 750 | 11/13/2020 |
| 3.2.20 | 936 | 11/8/2020 |
| 3.2.19 | 839 | 10/23/2020 |
| 3.2.18 | 856 | 10/21/2020 |
| 3.2.17 | 929 | 9/20/2020 |
| 3.2.16 | 847 | 9/7/2020 |
| 3.2.15 | 853 | 8/30/2020 |
| 3.2.14 | 797 | 8/20/2020 |
| 3.2.13 | 911 | 7/27/2020 |
| 3.2.12 | 802 | 7/13/2020 |
| 3.2.11 | 932 | 6/28/2020 |
| 3.2.10 | 954 | 6/14/2020 |
| 3.2.9 | 931 | 6/3/2020 |
| 3.2.7 | 938 | 5/4/2020 |
| 3.2.6 | 833 | 4/21/2020 |
| 3.2.5 | 915 | 4/15/2020 |
| 3.2.4 | 893 | 4/12/2020 |
Currently implements:
Functions
DnsAcquireContextHandle_ DnsCancelQuery DnsCancelQueryRaw DnsExtractRecordsFromMessage_W DnsFree DnsFreeCustomServers DnsFreeProxyName DnsGetApplicationSettings DnsGetCacheDataTable DnsGetProxyInformation DnsModifyRecordsInSet_ DnsNameCompare_ DnsQueryConfig DnsQueryEx DnsQueryRaw DnsQueryRawResultFree DnsQuery_ DnsRecordCompare DnsRecordCopyEx DnsRecordSetCompare DnsRecordSetCopyEx DnsRecordSetDetach DnsReleaseContextHandle DnsReplaceRecordSet DnsServiceBrowse DnsServiceBrowseCancel DnsServiceConstructInstance DnsServiceCopyInstance DnsServiceDeRegister DnsServiceFreeInstance DnsServiceRegister DnsServiceRegisterCancel DnsServiceResolve DnsServiceResolveCancel DnsSetApplicationSettings DnsStartMulticastQuery DnsStopMulticastQuery DnsValidateName_ DnsValidateServerStatus DnsWriteQuestionToBuffer_W
Structures
DNS_AAAA_DATA DNS_ADDR DNS_ADDR_ARRAY DNS_APPLICATION_SETTINGS DNS_ATMA_DATA DNS_A_DATA DNS_CACHE_ENTRY DNS_CUSTOM_SERVER DNS_DHCID_DATA DNS_DS_DATA DNS_HEADER DNS_KEY_DATA DNS_LOC_DATA DNS_MESSAGE_BUFFER DNS_MINFO_DATA DNS_MX_DATA DNS_NAPTR_DATA DNS_NSEC3PARAM_DATA DNS_NSEC3_DATA DNS_NSEC_DATA DNS_NULL_DATA DNS_NXT_DATA DNS_OPT_DATA DNS_PROXY_INFORMATION DNS_PTR_DATA DNS_QUERY_CANCEL DNS_QUERY_RAW_CANCEL DNS_QUERY_RAW_REQUEST DNS_QUERY_RAW_RESULT DNS_QUERY_REQUEST DNS_QUERY_REQUEST3 DNS_QUERY_RESULT DNS_RECORD DNS_RECORD_FLAGS DNS_RRSET DNS_SERVICE_BROWSE_REQUEST DNS_SERVICE_BROWSE_REQUEST_CALLBACK DNS_SERVICE_CANCEL DNS_SERVICE_INSTANCE DNS_SERVICE_REGISTER_REQUEST DNS_SERVICE_RESOLVE_REQUEST DNS_SIG_DATA DNS_SOA_DATA DNS_SRV_DATA DNS_TKEY_DATA DNS_TLSA_DATA DNS_TSIG_DATA DNS_TXT_DATA DNS_UNKNOWN_DATA DNS_WINSR_DATA DNS_WINS_DATA DNS_WIRE_QUESTION DNS_WIRE_RECORD DNS_WKS_DATA HDNSCONTEXT IP4_ARRAY MDNS_QUERY_HANDLE MDNS_QUERY_REQUEST