Issuse with the Winformexample SharpPcap Addapter

297 views Asked by At

How do I refresh the list of adapters in C#?

Say the following happens:

  • List device and I see the device.
  • I unplug and replug in WITHOUT starting the software.
  • the device changes from: \\.\airpcap00 AirPcap USB wireless capture adapter nr. 00 to \\.\airpcap01 AirPcap USB wireless capture adapter nr. 01

  • but the list of devices still seems to show: \\.\airpcap00 AirPcap USB wireless capture adapter nr. 00

How do I refresh the device to show the correct list?

1

There are 1 answers

1
Chris Morgan On

Use WinPcapDeviceList.Instance.Refresh() or AirPcapDeviceList or LibPcapDeviceList to refresh the list.