Platform SDK: Network Management |
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)
If the DnsNameCompare function type is called without its suffix (_A or _W), a compiler error will occur.
BOOL DnsNameCompare( LPSTR pName1, LPSTR pName2 );
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.
Returns TRUE if the compared names are equivalent, FALSE if they are not.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Windns.h.
Library: Use Dnsapi.lib.