Java programmer new to C#/using C# and Win32API
Hi guys, im a newbie to C# having programmed with Java a fair amount.
Im currently writing my own (amateur) intrusion detection system and the reason i haven't done this in Java is that a friend told me it would be easier to access the OS using C#.
I was wondering if you guys could give me a few basics how to do something like check a port using the win32API in C# and I could use that as an example and go from there.
I have tried finding books on the subject, but only found a MSPress C/C++ on the api
Thanks in advance
Re: Java programmer new to C#/using C# and Win32API
Not sure what you mean exactly when you say "check a port". Are you referring to serial port communications, TCP/IP, etc? Here is a tutorial on serial port communication in C#, you probably do not need to use the Win32 API directly at all.
http://www.dreamincode.net/forums/showtopic35775.htm
Re: Java programmer new to C#/using C# and Win32API
Quote:
Originally Posted by
BigEd781
Not sure what you mean exactly when you say "check a port". Are you referring to serial port communications, TCP/IP, etc? Here is a tutorial on serial port communication in C#, you probably do not need to use the Win32 API directly at all.
http://www.dreamincode.net/forums/showtopic35775.htm
Hey, basically ive been told say i want to monitor a port which is letting msn messenger traffic through, i would not be able to connect to that port via C# because 'msn messenger' would have rights over the port and c# would find that port is 'unavailable'.
So a friend of mine suggesed that i would need to go a level down, to the OS in order to monitor TCP and UDP ports.
In addition, i was hoping to monitor registry changes for particular keys etc.
Hope this clarifies?
Re: Java programmer new to C#/using C# and Win32API
Re: Java programmer new to C#/using C# and Win32API
Re: Java programmer new to C#/using C# and Win32API
I think this is what you're looking for .NET WinPCap
Re: Java programmer new to C#/using C# and Win32API
Quote:
Originally Posted by
memeloo
http://pcapdotnet.codeplex.com/
Would someone be able to give me some advice how i actually get this 'wrapper' stuff set up?
I'm not the world's best when it comes to libraries. Ive got VS2008 Pro installed, so i have access to all .NET methods.
Re: Java programmer new to C#/using C# and Win32API