3
다음은 Windows XP에서 기본 NIC를 가져 오는 코드이지만 Windows 7에서는 동일한 코드가 작동하지 않습니다. MSDN을 읽은 후 정말 혼란 스럽습니다. 어떤 해결책?Windows 7 기본 네트워크 어댑터
//----------------- Getting all the Nic's --------------------
foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces())
{
//------------ Getting properties of IPV4 ----------------
IPInterfaceProperties ipProps = nic.GetIPProperties();
//------------ Getting the Ip Properties -----------------
if (ipProps.GetIPv4Properties() != null)
{
dic.Add(ipProps.GetIPv4Properties().Index, nic.Name);
}
오류 : 요청 프로토콜이 구성되지 않았거나 구현이 없습니다.
오류가 발생하는 라인은 무엇입니까? –