【发布时间】:2019-12-12 17:12:50
【问题描述】:
我想通过 ShellExecute 从 c++ 脚本调用 tshark.exe。有什么方法可以解析应用程序的 cmd 参数吗? 例如像这样指定输出文件
tshark -w output.pcap
这里是代码
#include <Windows.h>
#include <shellapi.h>
int main()
{
ShellExecute(NULL, "open", "tshark.exe", NULL, "C:\Program Files\Wireshark", SW_SHOWDEFAULT);
return 0;
}
【问题讨论】:
-
我读过,但我不太明白语法。我应该如何添加 -w output.pcap?
-
代码无法编译。在继续前进之前转到here。
标签: c++ winapi wireshark tshark