次の方法で共有


DnsModifyRecordsInSet (Compact 2013)

3/26/2014

This function adds, modifies or removes a Resource Record (RR) set that may have been previously registered with DNS servers.

This 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) Windows Embedded Compact 2013 supports only the Unicode character encoding.

Syntax

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

Parameters

  • pAddRecords
    [in] Pointer to the DNS_RECORD structure that contains the RRs to be added to the RR set
  • pDeleteRecords
    [in] Pointer to the DNS_RECORD structure that contains the RRs to be deleted from the RR set
  • Options
    [in] a value that contains a bitmap of DNS Update Options that apply to the operation. Options can be combined and 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 an array of DNS server IP addresses to which the Find Authoritative Zone (FAZ) request is sent. Compact 2013 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 message upon a successful completion. Otherwise, it returns the appropriate DNS-specific error code as defined in Winerror.h.

Remarks

Compact 2013 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 Compact 2013, this hContext is obtained by a call to a SEC_WINNT_AUTH_IDENTITY_W structure filled with the appropriate settings and typecast to be a HANDLE.

Ee493441.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.

If pDeleteRecords contains 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, provide no records in pDeleteRecords, and provide the record to be added in pAddRecords.

To modify a record, specify the record being modified pDeleteRecords and add the modified version of that record by placing it in pAddRecords.

To delete records, specify records to be deleted in pDeleteRecords and leave pAddRecords empty.

Multiple records can be added or deleted in a single call to DnsModifyRecordInSet; however, the value of the pName member in each DNS_RECORD must be the same or the call will fail. If a record specified in pAddRecords is already present, no change occurs.

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

Compact 2013 does not have a registry key that sets the default security in authentication and 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