DnsReplaceRecordSet function (Windows)

Switch View :
ScriptFree
DnsReplaceRecordSet function

Applies to: desktop apps only

The DnsReplaceRecordSet function type replaces an existing resource record (RR) set. Like many DNS functions, the DnsReplaceRecordSet function type is implemented in multiple forms to facilitate different character encoding, which is indicated by a suffix. Based on the character encoding involved, use one of the following functions:

DnsReplaceRecordSetA (_A for ANSI encoding)

DnsReplaceRecordSetW (_W for Unicode encoding)

DnsReplaceRecordSetUTF8 (_UTF8 for UTF 8 encoding)

Be aware of the lack of an underscore between the function type name and its suffix. If the DnsReplaceRecordSet function type is called without its suffix (A, W, or UTF8), a compiler error will occur.

Syntax

DNS_STATUS WINAPI DnsReplaceRecordSet(
  __in         PDNS_RECORD pNewSet,
  __in         DWORD Options,
  __in_opt     HANDLE hContext,
  __inout_opt  PVOID pExtraInfo,
  __inout_opt  PVOID pReserved
);

Parameters

pNewSet [in]

A pointer to a DNS_RECORD structure that contains the RR set that replaces the existing set. The specified RR set is replaced with the contents of pNewSet. To delete a RR set, specify the set in pNewSet, but set RDATA to NULL.

Options [in]

A value that contains a bitmap of DNS Update Options. Options can be combined and all options override DNS_UPDATE_SECURITY_USE_DEFAULT.

hContext [in, optional]

The handle to the credentials of a specific account. Used when secure dynamic update is required. This parameter is optional.

pExtraInfo [in, out, optional]

This parameter is reserved for future use and must be set to NULL.

pReserved [in, out, optional]

This parameter is reserved for future use and must be set to NULL.

Return value

Returns success confirmation upon successful completion. Otherwise, returns the appropriate DNS-specific error code as defined in Winerror.h.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Windns.h

Library

Dnsapi.lib

DLL

Dnsapi.dll

Unicode and ANSI names

DnsReplaceRecordSetA (Unicode) and DnsReplaceRecordSetW (ANSI)

See also

DNS_RECORD
DnsModifyRecordsInSet

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012