Collapse the table of content
Expand the table of content

DnsReplaceRecordSetW (Windows CE 5.0)

Windows CE 5.0
Send Feedback

This function replaces an existing record set. Windows CE supports the Unicode encoding, as indicated by the *_W suffix.

  DWORD Options,
  HANDLE hContext,
  PIP_ARRAY pServerList,
  PVOID pReserved


[in] Pointer to the DNS_RECORD structure holding the resource record set that replaces the existing set. The specified resource record set is replaced with the contents of pNewSet.
[in] Options to apply to the operation. The following table shows available options, which can be combined.
DNS_UPDATE_SECURITY_OFFDoes not attempt secure dynamic updates if names cannot be registered anonymously. This is the default setting.
DNS_UPDATE_SECURITY_ONAttempts nonsecure dynamic update. If refused, then attempts secure dynamic update.
DNS_UPDATE_SECURITY_ONLYAttempts secure dynamic updates only. Does not attempt anonymous name registration.
[in] Handle to the credentials of a specific account. This is used when secure dynamic update is required. This parameter is optional. For more information, see the Remarks section.
[in] Pointer to the array of DNS server IP addresses to which the Find Authoritative Zone (FAZ) request is sent. Windows CE supports a maximum of one server listed in this parameter. Attempts to specify multiple DNS servers result in failure.
Reserved for future use.

Return Values

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


On Windows CE, this hContext is not obtained by a call to DnsAcquireContextHandle, but is instead a SEC_WINNT_AUTH_IDENTITY_W structure filled with the appropriate settings and typecasted to be a HANDLE.

Security Note   Because hContext might contain a user password, name, and domain information, calling functions should clear hContext when the data is no longer required.

Unlike desktop versions of Windows, Windows CE does not have a registry key that sets the default security in authentication and that is used through DNS_UPDATE_SECURITY_USE_DEFAULT.


OS Versions: Windows CE 5.0 and later.
Header: Windns.h.
Link Library: Dnsapi.lib.

See Also

DNS Functions | TCP/IP and the DNS Client | SEC_WINNT_AUTH_IDENTITY

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.

© 2015 Microsoft