为什么nslookup.exe可以解析指定的DNS服务器,但dnsapi.dll中没有相应的API?
nslookup.exe www.google.com 127.0.0.1
该命令可以使用 DNS 服务器 127.0.0.1 进行解析,不可能在 75.0 KB 的 nslookup.exe 中实现全栈 DNS 协议解析器,因此它一定使用了 dnsapi.dll。
那么哪个dll导出C函数可以提供与dnsapi.dll中指定的DNS服务器类似的gethostbyname()呢?
nslookup.exe www.google.com 127.0.0.1
This command can resolve using DNS server 127.0.0.1, it's impossible to implement a full stack DNS protocol resolver in a 75.0 KB nslookup.exe, so it must have been using dnsapi.dll.
So which dll export C function can provide similar gethostbyname() with a specified DNS server in dnsapi.dll?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将
pExtra
参数用于DNSQuery
函数。显然 MSDN 文档 不完整,因为它说这个参数必须为空。
有关其使用示例,请参阅 http://support.microsoft.com/kb/831226 。
You can use the
pExtra
parameter to theDNSQuery
function.Apparently the MSDN documentation is incomplete, since it says this parameter must be null.
See http://support.microsoft.com/kb/831226 for an example of its use.