Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i am writing a program for port and its process application. by using netstat i cant get all things in once i only get port information

C#
char command[50];  

   _snprintf( command, sizeof command, "netstat -abon"  );
   system(command);



for getting all port procss and other information in once i got one powerscript from here.
http://gallery.technet.microsoft.com/scriptcenter/Get-NetworkStatistics-66057d71[^]

it is working fine for me and giving me output which i want.

now how should i use it in c++. please help me
Posted

1 solution

Cannot you use system to launch the powershell script, as shown , for instance, here[^]?
 
Share this answer
 
Comments
[no name] 11-Jun-14 2:24am    
Agree, 5+.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900