mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
[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:
parent
8ba6c78a50
commit
b8998128ea
1 changed files with 18 additions and 16 deletions
|
@ -3280,23 +3280,25 @@ INetCfgComponentControl_fnApplyRegistryChanges(
|
|||
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);
|
||||
}
|
||||
|
||||
if (!pCurrentConfig->Ns || pCurrentConfig->AutoconfigActive)
|
||||
{
|
||||
RegSetValueExW(hKey, L"NameServer", 0, REG_SZ, (LPBYTE)L"", 1 * sizeof(WCHAR));
|
||||
}
|
||||
else
|
||||
{
|
||||
pStr = CreateMultiSzString(pCurrentConfig->Ns, IPADDR, &dwSize, TRUE);
|
||||
if(pStr)
|
||||
{
|
||||
RegSetValueExW(hKey, L"NameServer", 0, REG_SZ, (LPBYTE)pStr, dwSize);
|
||||
RegDeleteValueW(hKey, L"DhcpNameServer");
|
||||
CoTaskMemFree(pStr);
|
||||
}
|
||||
}
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
|
||||
if (!pCurrentConfig->Ns || pCurrentConfig->AutoconfigActive)
|
||||
{
|
||||
RegSetValueExW(hKey, L"NameServer", 0, REG_SZ, (LPBYTE)L"", 1 * sizeof(WCHAR));
|
||||
}
|
||||
else
|
||||
{
|
||||
pStr = CreateMultiSzString(pCurrentConfig->Ns, IPADDR, &dwSize, TRUE);
|
||||
if(pStr)
|
||||
{
|
||||
|
||||
RegSetValueExW(hKey, L"NameServer", 0, REG_SZ, (LPBYTE)pStr, dwSize);
|
||||
RegDeleteValueW(hKey, L"DhcpNameServer");
|
||||
CoTaskMemFree(pStr);
|
||||
}
|
||||
}
|
||||
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue