Hi,
Our team is working on a network monitoring tool. We have identified "WINPCAP" as the library that provides support for packet capturing. WINPCAP is made for WIN32 applications and is coded in 'C' language. We intend to use this library on C# platform. If anyone has an idea or experience(.. using native C code in a C# application), then please help.
Our team is working on a network monitoring tool. We have identified "WINPCAP" as the library that provides support for packet capturing. WINPCAP is made for WIN32 applications and is coded in 'C' language. We intend to use this library on C# platform. If anyone has an idea or experience(.. using native C code in a C# application), then please help.
Warm Regards

using native C code in a C# application
Steve815
You have two options. The first, if your C code is in a dll, is pinvoke. www.pinvoke.net has lots of examples, you can basically declare a method whose signature matches a method in the dll, and imports the dll and calls it.
Your other option is C++/CLI, you can write a C++ dll that wraps your C code in a managed class, which you can then manipulate in C#.
The advantage of method 1 is that it's quick and easy, the advantage of method 2 is that it's stateful, you can end up creating class instances in C# and working with them.