rjdown
asked on
Reading current connections
Hi!
I need to read a PCs current connections, something like the DOS command NETSTAT does...
At the moment, I'm using
Shell("command.com /c " & "netstat -> " & Chr(34) & AppPath & "netstat.txt" & Chr(34), vbHide)
and then reading this information into memory, extracting the data with a couple of basic IFs and Right()s etc
However I'm sure there is an easier way!
The information I need to extract is:
1) The resolved DNS (not ip) address
2) The local port used
and
3) If the connection is currently established (ie not SYN_SENT or CLOSE_WAIT as it says in NETSTAT)
Thanks!
I need to read a PCs current connections, something like the DOS command NETSTAT does...
At the moment, I'm using
Shell("command.com /c " & "netstat -> " & Chr(34) & AppPath & "netstat.txt" & Chr(34), vbHide)
and then reading this information into memory, extracting the data with a couple of basic IFs and Right()s etc
However I'm sure there is an easier way!
The information I need to extract is:
1) The resolved DNS (not ip) address
2) The local port used
and
3) If the connection is currently established (ie not SYN_SENT or CLOSE_WAIT as it says in NETSTAT)
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
:O well I did ask for an EASIER way lol..
ASKER
ahh cmon there MUST be a way without all this code :(
ASKER
hmm
well I followed the link you gave, and managed to find some suitable code. Thanks :)
well I followed the link you gave, and managed to find some suitable code. Thanks :)
For nothing :)
ASKER