dotpcap / sharppcap

Official repository - Fully managed, cross platform (Windows, Mac, Linux) .NET library for capturing packets
1.33k stars 268 forks source link

Accessviolationexception #53

Closed Houzhendong closed 5 years ago

Houzhendong commented 6 years ago

I catch a accessviolationexception while calling CaptureDeviceList.Instance ,here are part of exception message

at System.Runtime.InteropServices.Marshal.PtrToStructureHelper(IntPtr ptr, Object structure, Boolean allowValueClasses) at System.Runtime.InteropServices.Marshal.PtrToStructure(IntPtr ptr, Type structureType) at SharpPcap.WinPcap.WinPcapDeviceList.Devices(String rpcapString, RemoteAuthentication remoteAuthentication) at SharpPcap.WinPcap.WinPcapDeviceList.Refresh() at SharpPcap.WinPcap.WinPcapDeviceList..ctor() at SharpPcap.WinPcap.WinPcapDeviceList.get_Instance() at SharpPcap.CaptureDeviceList..ctor() at SharpPcap.CaptureDeviceList.get_Instance()

how can I solve it?

chmorgan commented 6 years ago

It's almost like the required library, npcap, isn't installed. Any more info about your runtime situation? Windows/Linux/Mac? Dotnet, mono?

chmorgan commented 5 years ago

Closing as there has been no response.