获取DNS列表

来源:互联网 发布:手机怎么免费开淘宝店 编辑:程序博客网 时间:2024/05/09 16:52

FIXED_INFO pi;
 ZeroMemory(&pi,sizeof(pi));
 ULONG pLen=sizeof(pi);
 GetNetworkParams(&pi,&pLen);
 printf("/nDnsList:%s/n",pi.DnsServerList.IpAddress.String);//DNS列表
 printf("/nHostName:%s/n",pi.HostName);

原创粉丝点击