CodePudding user response:
A little bit more simple method, redirect to a file, then open the file to readCodePudding user response:
Many online code, do not copy and paste,According to your requirement to do, to create a process directly, run the CMD. Exe, redirect its input and output can be asynchronous receive real-time data and return, we can see this post: http://blog.csdn.net/irwin_chen/article/details/7430551
In addition, also can directly use the.net socket to realize the icmp protocol, refer to the article: http://www.xuebuyuan.com/1642800.html