1、使用ShellExecute打开br.exe应用程序(br.exe应用程序在dos窗口下可以运行),执行结果:弹出dos窗口显示运行结果后,dos窗口就秒退了
2、代码如下:
ShellExecute(0,"open","E:\IDIdentify\openbr-new\build-msvc2013-x86\install\bin\br.exe","-algorithm FaceRecognition -compare E:\IDIdentify\openbr-new\build-msvc2013-x86\install\bin\3.jpg E:\IDIdentify\openbr-new\build-msvc2013-x86\install\bin\4.jpg","",SW_SHOWNORMAL);
看上去应该是你的参数传递可能有问题。导致br.exe退出了。
你把参数全部放到exe路径一起里面去。
"E:\IDIdentify\openbr-new\build-msvc2013-x86\install\bin\br.exe \"-algorithm FaceRecognition -compare \"E:\IDIdentify\openbr-new\build-msvc2013-x86\install\bin\3.jpg E:\IDIdentify\openbr-new\build-msvc2013-x86\install\bin\4.jpg\"\"",
怎么样才能让dos窗口不秒退?求大神解答,在线等
怎么样才能让dos窗口不秒退?求大神解答,在线等
如果可以的话,做成批处理文件,批处理加入等待命令就行,shellexecute执行批处理。或者shell之类的打开。
使用cmd /k br.exe xxx即可