Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I would like to write a packet on a file but it doesn't work.
C#
CaptureFileWriterDevice captureFileReader = new CaptureFileWriterDevice(devices[i], "D:\\Documents and Settings\\amin\\Mes documents\\file.pcap");

please I need help


Error 1: The overloaded method that best 'SharpPcap.LibPcap.CaptureFileWriterDevice.CaptureFileWriterDevice (SharpPcap.LibPcap.LibPcapLiveDevice, string)' has some invalid arguments
Posted
Updated 9-Nov-11 22:53pm
v3
Comments
Mehdi Gholam 10-Nov-11 4:49am    
And what is the error you are getting?
Legor 10-Nov-11 4:49am    
What doesnt work? Any error messages? Improve your question.
Timberbird 10-Nov-11 4:54am    
Haven't worked with that framework, but according to description article... do you call captureFileReader.Write(e.Packet) later?
aminenjeh 10-Nov-11 4:59am    
the prb is on the
CaptureFileWriterDevice captureFileReader = new CaptureFileWriterDevice(devices[i], "D:\\Documents and Settings\\amin\\Mes documents\\file.pcap");

Error 1: The overloaded method that best 'SharpPcap.LibPcap.CaptureFileWriterDevice.CaptureFileWriterDevice (SharpPcap.LibPcap.LibPcapLiveDevice, string)' has some invalid arguments
aminenjeh 10-Nov-11 5:00am    
Error 2 Argument '1 ': can not convert from' SharpPcap.ICaptureDevice 'to' SharpPcap.LibPcap.LibPcapLiveDevice '

1 solution

You should really read the FAQ before posting here: "it doesn't work" tell us near zero about your prblem.
I may just guess the above statement is throwing an exception, but you told us nothing about.
Please elaborate.
Moreover I suppose you have the source code of the framework you are using (available here[^]) hence you might delve inside it to find what is going wrong.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900