Hi I have to develop a Network Sniffer using c#. I'm very new to network programming. I have gone through the articles in codeproject meant for the same. Most of them are making use of WinPcap. Does network programming using C#.Net provide all the functionalities of WinPcap? When I've to make use of WinPcap? Regards, Diana.
Diana Fernandez
Posts
-
Does C# provide all the functionalities of WinPcap? -
how to change a row color in a data grid view in c# win application project?Try the following code
dgView.Rows[1].DefaultCellStyle.BackColor = Color.Yellow; dgView.Rows[1].DefaultCellStyle.ForeColor = Color.Black;
Regards, -
can i use optional parametersSee the code snippet copied from MSDN. Hope this helps...
using System; public class MyClass { public static void UseParams(params int[] list) { for (int i = 0 ; i < list.Length; i++) { Console.WriteLine(list[i]); } Console.WriteLine(); } public static void UseParams2(params object[] list) { for (int i = 0 ; i < list.Length; i++) { Console.WriteLine(list[i]); } Console.WriteLine(); } static void Main() { UseParams(1, 2, 3); UseParams2(1, 'a', "test"); // An array of objects can also be passed, as long as // the array type matches the method being called. int[] myarray = new int[3] {10,11,12}; UseParams(myarray); } }
-
Console output to a fileCheck This link http://www.codeproject.com/dotnet/CSharpPing.asp[^]
-
Console output to a fileusing System.IO; TextWriter tw = new StreamWriter(@"C:\\Log.txt"); tw.WriteLine("Enter Required Text here"); tw.Flush(); tw.Close();
Hope this helps. -
Controlling an application from another.Hi, A and B are two processes. To get hold of objects in B you have to attach a dll into B. See the link below. http://www.codeproject.com/dotnet/objectspy.asp
-
listview with compact frameworkFor each item in listview you have to set the color like this.listView1.Items[0].ForeColor = System.Drawing.Color.Red; this.listView1.Items[0].ForeColor = System.Drawing.Color.Blue;
-
Removing event handlersWith an event you can use only += or -= operator. Actually keyword "event" is modifying a delegate for this behaviour.
-
Datagrid in deviceApplicationCheck that the readonly property of the datagrid is set to false.
-
Preventing method access in derived class.Consider the scenario given below public class Base { protected string _name = null; public void SetName(string Name) { _name = Name; } } public class Derived : Base { public void SetName(string Name, bool Condition) { if (Condition) _name = Name + "true"; else _name = Name + "false"; } } How is it possible to prevent accessing the Base class method on the object of derived class? Because base class implementation should not be used on the object of derived class.
-
Preventing method access in derived class.Hi Is it possible to prevent accessing a method in derived class? Since "sealed" keyword is only used along with "override" I can not use this option in the base class. Thanks, Diana.
-
Is it possible to share objects (Managed code c#) across applications?FYI... It is possible to attach a dll into a process from a different process and invoke a static method available with that dll. So it is possible to enter into a process and do whatever there, though we can't access the data back to the attaching process. If interested to know more see the article ".NET Object Spy and InvokeRemote". Thanks Diana.
-
Is it possible to share objects (Managed code c#) across applications?Ok, Thanks. But how is it possible with "GetActiveObject" method for unmanaged objects? Diana.
-
Is it possible to share objects (Managed code c#) across applications?Hi Russ, Bothe applications are running on the same machine. As I don't know the channel informations, I cannot use remoting as well as I cannot modify the application. I would like to know is there any method similar to "GetActiveObject" available for this? Thanks Diana.
-
Is it possible to share objects (Managed code c#) across applications?Hi Christians, There is one application which is developed totally on c#. At runtime I want to make use of one of the objects of these application from another application that too is developed in c#. But in the first application I cannot make any modification or the channel informations are not available otherwise I could have used remoting. There is a method "GetActiveObject" but it is working only for unmanaged objects (I think). Is there any method equivalet to this which can give the referece of the active or running objects? Thanks Diana.
-
How to access the running instance of a object?Hi Parwej, Thanks for the reply. I want to get hold of an object from a different application for automated testing purpose. Diana.
-
Is it possible to share objects (Managed code c#) across applications?Thanks, Diana.
-
How to access the running instance of a object?Hi All, Is there anyway to access the reuuning instance of an object in a application from another application. Both the applications are built using C#. I have tried using the GetActiveObject, but it seems used for COM objects. Is there any method available for managed objects. I don't want to use remoting. Thanks in advance Diana.
-
Check box in a Listview column header possible?Hi Is it possible to have a check box in a listview (windows application) column header and while checking this, all the check boxes in the column will be checked?
-
A simple question related to strings in c#Hi You mean all the identical strings will have same reference? Thanks