为什么nslookup.exe可以解析指定的DNS服务器,但dnsapi.dll中没有相应的API?

发布于 2024-08-12 11:24:08 字数 214 浏览 2 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

黄昏下泛黄的笔记 2024-08-19 11:24:08

您可以将 pExtra 参数用于 DNSQuery 函数。

显然 MSDN 文档 不完整,因为它说这个参数必须为空。

有关其使用示例,请参阅 http://support.microsoft.com/kb/831226

You can use the pExtra parameter to the DNSQuery 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文