|
-
January 14th, 2010, 06:01 PM
#1
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
-
January 14th, 2010, 07:29 PM
#2
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
-
January 14th, 2010, 10:20 PM
#3
Re: Java programmer new to C#/using C# and Win32API
 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?
-
January 15th, 2010, 05:40 PM
#4
Re: Java programmer new to C#/using C# and Win32API
-
January 16th, 2010, 05:09 AM
#5
Re: Java programmer new to C#/using C# and Win32API
-
January 16th, 2010, 06:07 AM
#6
Re: Java programmer new to C#/using C# and Win32API
I think this is what you're looking for .NET WinPCap
win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming
remeber to give feedback  you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation
private lessons are not an option so please don't ask for help in private, I won't replay
if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know
-
January 22nd, 2010, 08:29 PM
#7
Re: Java programmer new to C#/using C# and Win32API
 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.
-
January 23rd, 2010, 03:47 PM
#8
Re: Java programmer new to C#/using C# and Win32API
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|