如何在c ++中集成powerscript [英] How to integrate powerscript in c++
本文介绍了如何在c ++中集成powerscript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在为端口及其流程应用程序编写程序。通过使用netstat我无法获取所有东西我只获得端口信息
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
char command[50];
_snprintf( command, sizeof command, "netstat -abon" );
system(command);
一次性获取所有端口procss和其他信息我从这里得到一个powerscript。
http://gallery.technet.microsoft .com / scriptcenter / Get-NetworkStatistics-66057d71 [ ^ ]
它对我来说很好,给我输出我想要的。
现在应该如何在c ++中使用它。请帮助我
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
推荐答案
你不能使用 system
来启动powershell脚本,例如,< a href =http://mrpowershell.blogspot.it/2013/10/how-to-cal-powershell-script-with-c.html>这里 [ ^ ]?
Cannot you use system
to launch the powershell script, as shown , for instance, here[^]?
这篇关于如何在c ++中集成powerscript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文