PcapDotNet / Pcap.Net

.NET wrapper for WinPcap written in C++/CLI and C#, which features almost all WinPcap features and includes a packet interpretation framework.
BSD 3-Clause "New" or "Revised" License
564 stars 167 forks source link

Creating Dump File Does Not Work #118

Open DougSteiert opened 4 years ago

DougSteiert commented 4 years ago

I have nearly the same, if not identical, code to the examples to create a dump file (assuming pcap) to write to, but nothing happens and Visual Studio says "...exited with code -1073741510".

using (PacketCommunicator communicator =
      selectedDevice.Open(65536, PacketDeviceOpenAttributes.Promiscuous, 1000))
{
     using (PacketDumpFile dumpFile = communicator.OpenDump("testDumpFile.dump"))
     {
         Console.WriteLine("Listening on " + selectedDevice.Description + "...");
         communicator.ReceivePackets(0, dumpFile.Dump);
     }
}