[NETCFGX]

- Save DHCP and DNS settings from the basic TCP/IP panel independently of each other
See issue #5193 for more details.

svn path=/trunk/; revision=47010
This commit is contained in:
Gregor Schneider 2010-04-25 10:47:10 +00:00
parent 8ba6c78a50
commit b8998128ea

View file

@ -3280,6 +3280,7 @@ INetCfgComponentControl_fnApplyRegistryChanges(
RegSetValueExW(hKey, L"DefaultGateway", 0, REG_MULTI_SZ, (LPBYTE)L"", 1 * sizeof(WCHAR)); RegSetValueExW(hKey, L"DefaultGateway", 0, REG_MULTI_SZ, (LPBYTE)L"", 1 * sizeof(WCHAR));
RegSetValueExW(hKey, L"DefaultGatewayMetric", 0, REG_MULTI_SZ, (LPBYTE)L"\0", sizeof(WCHAR) * 2); RegSetValueExW(hKey, L"DefaultGatewayMetric", 0, REG_MULTI_SZ, (LPBYTE)L"\0", sizeof(WCHAR) * 2);
} }
}
if (!pCurrentConfig->Ns || pCurrentConfig->AutoconfigActive) if (!pCurrentConfig->Ns || pCurrentConfig->AutoconfigActive)
{ {
@ -3290,14 +3291,15 @@ INetCfgComponentControl_fnApplyRegistryChanges(
pStr = CreateMultiSzString(pCurrentConfig->Ns, IPADDR, &dwSize, TRUE); pStr = CreateMultiSzString(pCurrentConfig->Ns, IPADDR, &dwSize, TRUE);
if(pStr) if(pStr)
{ {
RegSetValueExW(hKey, L"NameServer", 0, REG_SZ, (LPBYTE)pStr, dwSize); RegSetValueExW(hKey, L"NameServer", 0, REG_SZ, (LPBYTE)pStr, dwSize);
RegDeleteValueW(hKey, L"DhcpNameServer"); RegDeleteValueW(hKey, L"DhcpNameServer");
CoTaskMemFree(pStr); CoTaskMemFree(pStr);
} }
} }
RegCloseKey(hKey); RegCloseKey(hKey);
} }
}
return S_OK; return S_OK;
} }