Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Windows API获取DNS信息_Windows_Winapi_Dns - Fatal编程技术网

使用Windows API获取DNS信息

使用Windows API获取DNS信息,windows,winapi,dns,Windows,Winapi,Dns,我在尝试使用Windows API获取DNS信息时遇到问题。我有一个项目需要这些DNS信息: <Host>scontent-hkg4-1.xx.fbcdn.net</Host> <RecordName>scontent-hkg4-1.xx.fbcdn.net</RecordName> <RecordType>A</RecordType> <TimeToLive>PT6S</TimeToLive> &l

我在尝试使用Windows API获取DNS信息时遇到问题。我有一个项目需要这些DNS信息:

<Host>scontent-hkg4-1.xx.fbcdn.net</Host>
<RecordName>scontent-hkg4-1.xx.fbcdn.net</RecordName>
<RecordType>A</RecordType>
<TimeToLive>PT6S</TimeToLive>
<DataLength>4</DataLength>
<RecordData>
   <IPv4Address>157.240.199.15</IPv4Address>
</RecordData>
scocontent-hkg4-1.xx.fbcdn.net
scocontent-hkg4-1.xx.fbcdn.net
A.
PT6S
4.
157.240.199.15

此项目不允许我使用cmd从ipconfig获取信息,因此有人可以帮助我吗?

windns.h
头文件中有许多Windows API可用于DNS管理。看


或者不使用任何
ipconfig
或Windows API,您可以使用.NET framework类
System.NET.Dns
。参见

这听起来像homework@Keltari不,我正在用python做一个取证工具,用于我的毕业实习。这是我找不到访问所需API的最后一个易变信息。