在此方案中,函数无法解析提供的主机名,并且会收到“WSAHOST_NOT_FOUND(11001)”错误消息。 例如,你有以下环境: 后缀搜索列表:contoso.com、、foo.contoso.combar.contoso.com 尝试解析的主机名:测试 主机DNS A 记录存在于:foo.contoso.com 尝试运行以下示例代码时,调用失败并出现 11001 错误。
Specifies a DNS server. The acceptable values for this parameter are: an IP V4 address; an IP V6 address; any other value that resolves to an IP address, such as a fully qualified domain name (FQDN), host name, or NETBIOS name. ...
完全限定的域名在关联的addrinfo结构的ai_canonname成员中返回。 这不同于AI_CANONNAME位标志,后者返回在 DNS 中注册的规范名称,该规范名称可能与平面名称解析到的完全限定域名不同。 只能设置一个AI_FQDN位和AI_CANONNAME位。 如果两个标志都带有EAI_BADFLAGS,则 getaddrinfo函数将失败。
Specifies a remote DNS server. You can specify an IP address or any value that resolves to an IP address, such as a fully qualified domain name (FQDN), host name, or NETBIOS name. Type:String Aliases:Cn Position:Named Default value:None ...
{0};// Validate the parametersif(argc !=4) { wprintf(L"usage: %ws <hostname> <servicename> <namespace>\n", argv[0]); wprintf(L"getaddrinfoex provides protocol-independent translation\n"); wprintf(L" from a host name to an IP address\n"); wprintf(L"%ws example usage\n", ...
设置AI_FQDN位后,pNodeName参数不能为NULL。 否则,GetAddrInfoEx函数将失败并WSANO_RECOVERY。 Windows 7:AI_FQDN标志在适用于 Windows 7 及更高版本的 Windows SDK 上定义。 Windows 7 及更高版本支持AI_FQDN标志。 AI_FILESERVER如果设置了AI_FILESERVER,则会提示命名空间提供程序正在文件共享方案中使用正在查询...
设置AI_FQDN位后,pNodeName参数不能为NULL。 否则,GetAddrInfoEx函数将失败并WSANO_RECOVERY。 Windows 7:AI_FQDN标志在适用于 Windows 7 及更高版本的 Windows SDK 上定义。 Windows 7 及更高版本支持AI_FQDN标志。 AI_FILESERVER如果设置了AI_FILESERVER,则会提示命名空间提供程序正在文件共享方案中使用正在查询...
NI_NOFQDN标志:该标志导致返回的主机名第一个点号之后的内容被截去。举例来说,假设套接字 地址结构中的IP地址为192.168.42.2,那么不设置本标志的gethostbyaddr返回的主机名为 aix.unpbook.com,而设置本标志的gethostbyaddr返回的主机名为aix NI_NUMERICHOST标志:该标志告知getnameinfo不要调用DNS(因为调...
NI_NOFQDN标志:该标志导致返回的主机名第一个点号之后的内容被截去。举例来说,假设套接字 地址结构中的IP地址为192.168.42.2,那么不设置本标志的gethostbyaddr返回的主机名为 aix.unpbook.com,而设置本标志的gethostbyaddr返回的主机名为aix NI_NUMERICHOST标志:该标志告知getnameinfo不要调用DNS(因为调用DNS可能耗时),...
Specifies a DNS server. The acceptable values for this parameter are: an IP V4 address; an IP V6 address; any other value that resolves to an IP address, such as a fully qualified domain name (FQDN), host name, or NETBIOS name. ...