DnsReplaceRecordSetW (Compact 2013)

3/26/2014

This function replaces an existing record set. Windows Embedded Compact 2013 supports only the Unicode encoding, as indicated by the W suffix. Like many DNS functions, the DnsReplaceRecordSet function type is implemented in multiple forms to facilitate different character encoding, which is indicated by a suffix.

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 DnsReplaceRecordSetW(
  PDNS_RECORD pNewSet,
  DWORD Options,
  HANDLE hContext,
  PIP4_ARRAY pServerList,
  PVOID pReserved
);

Parameters

  • pNewSet
    [in] Pointer to the DNS_RECORD structure holding the Resource Record (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 to apply to the operation. All options override DNS_UPDATE_SECURITY_USE_DEFAULT. The following table shows available options, which can be combined.

    Option

    Description

    DNS_UPDATE_SECURITY_OFF

    Does not attempt secure dynamic updates if names cannot be registered anonymously. This is the default setting.

    DNS_UPDATE_SECURITY_ON

    Attempts nonsecure dynamic update. If refused, then attempts secure dynamic update.

    DNS_UPDATE_SECURITY_ONLY

    Attempts secure dynamic updates only. Does not attempt anonymous name registration.

  • hContext
    [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.
  • pServerList
    [in] Pointer to the array of DNS server IP addresses to which the Find Authoritative Zone (FAZ) request is sent. Windows Embedded Compact supports a maximum of one server listed in this parameter. Attempts to specify multiple DNS servers result in failure. This parameter is optional.
  • pReserved
    Reserved.

Return Value

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

Remarks

On Compact 2013, 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 typecast to be a HANDLE.

Ee494708.security(en-us,WinEmbedded.80).gifSecurity 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, Compact 2013 does not have a registry key that sets the default security in authentication and that is used through DNS_UPDATE_SECURITY_USE_DEFAULT.

Requirements

Header

windns.h

Library

dnsapi.lib

See Also

Reference

DNS Functions

Other Resources

SEC_WINNT_AUTH_IDENTITY