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\"\"",