- Query first for DhcpNameServer key value as this key is only present when DHCP is activated

svn path=/trunk/; revision=36889
This commit is contained in:
Johannes Anderwald 2008-10-22 09:13:15 +00:00
parent 627d39b522
commit 04b274e07b

View file

@ -124,10 +124,10 @@ static void EnumInterfaces( PVOID Data, EnumInterfacesFunc cb ) {
void EnumNameServers( HANDLE RegHandle, PWCHAR Interface,
PVOID Data, EnumNameServersFunc cb ) {
PWCHAR NameServerString =
QueryRegistryValueString(RegHandle, L"NameServer");
QueryRegistryValueString(RegHandle, L"DhcpNameServer");
if (!NameServerString)
NameServerString = QueryRegistryValueString(RegHandle, L"DhcpNameServer");
NameServerString = QueryRegistryValueString(RegHandle, L"NameServer");
if (NameServerString) {
/* Now, count the non-empty comma separated */