Sign in to follow this  
Followers 0
Kurtferro

StdoutRead -when the limit of characters is insufficient-

4 posts in this topic

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.. <_<

Share this post


Link to post
Share on other sites



<_< does nobody have in mind something?

Share this post


Link to post
Share on other sites

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.

<_<

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 <_<:):P:):D

Edited by Kurtferro

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0