Kurtferro Posted November 3, 2007 Posted November 3, 2007 Local $foo = Run(@ComSpec & " /c " & "netstat -o -f -n -p TCP", "", @SW_HIDE , $STDOUT_CHILD) Local $line = StdoutRead($foo) Local $avArray = StringSplit($line, @LF) Local $avstring =_ArrayToString($avArray,@LF) I use netstat to individualize if a process (PID) is currently at least a connection active internet, all works well until the connections they become a lot, then I have deduced that the cause is the maximum limit of characters of StdoutRead, but the command netstat doesn't allow me to subsequently filter, do you know a solution? if I could for example eliminate all the numbers I could use the recognition of process rather than of the PID..
MHz Posted November 3, 2007 Posted November 3, 2007 Have you tried using a loop to fully read the complete stdout? example: Local $line, $foo = Run(@ComSpec & " /c netstat -o -f -n -p TCP", "", @SW_HIDE , $STDOUT_CHILD) Do $line &= StdoutRead($foo) Until @error Local $avArray = StringSplit($line, @LF) Local $avstring =_ArrayToString($avArray,@LF) You can do up to 64KB in a single read, but you can continue reading the buffer until StdoutRead() produces @error.
Kurtferro Posted November 3, 2007 Author Posted November 3, 2007 (edited) ok tnx i try, reading singol read I had also thought to make a loop but I didn't have idea of as to correctly do it it work tnx Edited November 3, 2007 by Kurtferro
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now