DnsFreeCustomServers function (windns.h)

Frees the array of custom servers that was returned from a previous call to DnsGetApplicationSettings.

Syntax

void DnsFreeCustomServers(
  DWORD             *pcServers,
  DNS_CUSTOM_SERVER **ppServers
);

Parameters

pcServers

Type: _Inout_ DWORD*

A pointer to a DWORD that contains the number of servers present in the array pointed to by ppServers. This will be set to 0 after the function call.

ppServers

Type: _Inout_ DNS_CUSTOM_SERVER**

A pointer to an array of DNS_CUSTOM_SERVER that contains pcServers elements. This will be set to NULL after the function call.

Return value

None

Remarks

To avoid memory leaks, you must call DnsFreeCustomServers on the servers returned by DnsGetApplicationSettings via its pSettings parameter.

Requirements

Requirement Value
Minimum supported client Windows Build 22000
Minimum supported server Windows Build 22000
Target Platform Windows
Header windns.h
Library Dnsapi.lib
DLL Dnsapi.dll

See also