DnsModifyRecordsInSet_A function (windns.h)
The DnsModifyRecordsInSet function adds, modifies or removes a Resource Record (RR) set that may have been previously registered with DNS servers.
Like many DNS functions, the DnsModifyRecordsInSet function type is implemented in multiple forms to facilitate different character encoding. Based on the character encoding involved, use one of the following functions:
- DnsModifyRecordsInSet_A (_A for ANSI encoding)
- DnsModifyRecordsInSet_W (_W for Unicode encoding)
- DnsModifyRecordsInSet_UTF8 (_UTF8 for UTF 8 encoding)
Syntax
DNS_STATUS DnsModifyRecordsInSet_A(
[in, optional] PDNS_RECORD pAddRecords,
[in, optional] PDNS_RECORD pDeleteRecords,
[in] DWORD Options,
[in, optional] HANDLE hCredentials,
[in, out, optional] PVOID pExtraList,
[in, out, optional] PVOID pReserved
);
Parameters
[in, optional] pAddRecords
A pointer to the DNS_RECORD structure that contains the RRs to be added to the RR set.
[in, optional] pDeleteRecords
A pointer to the DNS_RECORD structure that contains the RRs to be deleted from the RR set.
[in] Options
A value that contains a bitmap of DNS Update Options. Options can be combined and all options override DNS_UPDATE_SECURITY_USE_DEFAULT.
[in, optional] hCredentials
A handle to the credentials of a specific account. Used when secure dynamic update is required. This parameter is optional.
[in, out, optional] pExtraList
This parameter is reserved for future use and must be set to NULL.
[in, out, optional] pReserved
This parameter is reserved for future use and must be set to NULL.
Return value
Returns success confirmation upon successful completion. Otherwise, it returns the appropriate DNS-specific error code as defined in Winerror.h.
Remarks
The DnsModifyRecordsInSet function type executes in the following steps.
- Records specified in pDeleteRecords are deleted. If pDeleteRecords is empty or does not contain records that exist in the current set, the DnsModifyRecordsInSet function goes to the next step.
- Records specified in pAddRecords are added. If pAddRecords is empty, the operation completes without adding any records.
If no server list is specified, the default name server is queried.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | windns.h |
Library | Dnsapi.lib |
DLL | Dnsapi.dll |