DnsNameCompare_A function (windns.h)
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_A(
[in] PCSTR pName1,
[in] PCSTR pName2
);
Parameters
[in] pName1
A pointer to a string that represents the first DNS name of the comparison pair.
[in] pName2
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
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | windns.h |
Library | Dnsapi.lib |
DLL | Dnsapi.dll |