DnsFreeCustomServers 函数 (windns.h)

释放从上一次调用 DnsGetApplicationSettings返回的自定义服务器的数组。

语法

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

参数

pcServers

类型:_Inout_ DWORD*

指向 DWORD 的指针,其中包含 ppServers指向的数组中存在的服务器数。 这将在函数调用后设置为 0。

ppServers

类型:_Inout_ DNS_CUSTOM_SERVER**

指向包含 pcServers 元素的 DNS_CUSTOM_SERVER 数组的指针。 这将在函数调用后设置为 NULL

返回值

没有

言论

若要避免内存泄漏,必须在 DnsGetApplicationSettings 通过 pSettings 参数返回的服务器上调用 DnsFreeCustomServers

要求

要求 价值
最低支持的客户端 Windows 内部版本 22000
支持的最低服务器 Windows 内部版本 22000
目标平台 窗户
标头 windns.h
Dnsapi.lib
DLL Dnsapi.dll

另请参阅