Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function allows you to modify or remove multiple resource record sets that are associated with a specific name. This function uses Dynamic DNS as its underlying technology. Windows Embedded CE supports only the Unicode encoding, as indicated by the *_Wsuffix.

Syntax

DNS_STATUS WINAPI DnsModifyRecordsInSet_W(
  PDNS_RECORD 
pAddRecords,
  PDNS_RECORD 
pDeleteRecords,
  DWORD 
Options,
  HANDLE 
hContext,
  PIP4_ARRAY 
pServerList,
  PVOID 
pReserved
);

Parameters

pAddRecords

[in] Pointer to the DNS_RECORDstructure containing the resource records to be added to the resource record set.

pDeleteRecords

[in] Pointer to the DNS_RECORDstructure containing the resource records to be deleted from the resource record set.

Options

[in] Options to apply to the operation. 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 an array of DNS server IP addresses to which the Find Authoritative Zone (FAZ) request is sent. Windows Embedded CE supports a maximum of one server listed in this parameter. Attempts to specify multiple DNS servers result in failure.

pReserved

Reserved for future use.

Return Value

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

Remarks

Windows Embedded CE only allows A and AAAA records to be updated. See the Windns.h header file for a complete listing of record set types and their numeric representations.

On Windows Embedded CE, this hContextis not obtained by a call to DnsAcquireContextHandle, but is instead a SEC_WINNT_AUTH_IDENTITY_ Wstructure filled with the appropriate settings and typecasted to be a HANDLE.

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

If pDeleteRecordscontains records that exist in the current set, this function deletes those records. Next, this function adds any records that are specified in pAddRecords.

To add a new record, you would provide no records in pDeleteRecords, and provide the record to be added in pAddRecords.

To modify a record, specify the record being modified in both pDeleteRecordsand pAddRecords. This removes the old version of the record, and then adds the modified version.

To delete records, specify records to be deleted in pDeleteRecordsand leave pAddRecordsempty.

Multiple records can be added or deleted in a single call to DnsModifyRecordInSet. If a record specified in pAddRecordsis already present, no change occurs.

If no server list is specified, the default name server is queried.

Unlike desktop versions of Windows, Windows Embedded CE 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
Windows Embedded CE Windows CE 5.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also