Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

DnsNameCompare function

The DnsNameCompare function compares two DNS names. Like many DNS functions, the DnsNameCompare function type is implemented in multiple forms to facilitate different character encoding. Based on the character encoding involved, use one of the following functions:

  • DnsNameCompare_A (_A for ANSI encoding)

  • DnsNameCompare_W (_W for Unicode encoding)

  • DnsNameCompare_UTF8 (_UTF8 for Unicode encoding)

Syntax


BOOL DnsNameCompare(
  _In_  PCTSTR pName1,
  _In_  PCTSTR pName2
);

Parameters

pName1 [in]

A pointer to a string that represents the first DNS name of the comparison pair.

pName2 [in]

A pointer to a string that represents the second DNS name of the comparison pair.

Return value

Returns TRUE if the compared names are equivalent, FALSE if they are not.

Remarks

Name comparisons are not case sensitive, and trailing dots are ignored.

As with other DNS comparison functions, the DnsNameCompare function deems different encoding as an immediate indication of differing values, and as such, the same names with different characters encoding will not be reported identically.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Windns.h

Library

Dnsapi.lib

DLL

Dnsapi.dll

Unicode and ANSI names

DnsNameCompare_W (Unicode) and DnsNameCompare_A (ANSI)

See also

DnsQuery
DnsRecordCompare
DnsRecordSetCompare
DNS_RECORD

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.