ShellExecuteEx函数调用exe执行文件出错 我使用ShellExecuteEx函数调用exe执行文件时总是弹出:“Windows找不懂*.exe,请确定文件名是否正确之后,再次尝试。”请问哪位高手可以给我指导指导。谢谢。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 这是我的源代码:SHELLEXECUTEINFO ShExecInfo = {0}; ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; ShExecInfo.hwnd = NULL; ShExecInfo.lpVerb = _T("open"); ShExecInfo.lpFile = _T("D2.exe"); ShExecInfo.lpParameters = _T("-f train"); ShExecInfo.lpDirectory = NULL; ShExecInfo.nShow = SW_HIDE; ShExecInfo.hInstApp = NULL; ShellExecuteEx(&ShExecInfo); BeginWaitCursor(); WaitForSingleObject(ShExecInfo.hProcess,INFINITE); EndWaitCursor(); 没找到D2.exe文件,把这个文件放在应用程序同级目录下· SHELLEXECUTEINFO ShExecInfo = {0}; ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; ShExecInfo.hwnd = NULL; ShExecInfo.lpVerb = _T("open"); ShExecInfo.lpFile = _T("C:\\Windows\\notepad.exe"); ShExecInfo.lpParameters = NULL; ShExecInfo.lpDirectory = NULL; ShExecInfo.nShow = SW_SHOW; ShExecInfo.hInstApp = NULL; ShellExecuteEx(&ShExecInfo); BeginWaitCursor(); WaitForSingleObject(ShExecInfo.hProcess,INFINITE); EndWaitCursor();这个我试了一下 没问题 如何获取进程的图标,并显示在list control里面 求助MCC_VC配置文件乱码问题~ 单文档程序怎样实现启动不显示?是不出现程序窗口 CSocket 接受问题! 全屏幕截屏的问题 关于CscrollBar的创建问题 各位大侠,下面的编译链接错如何改啊? 我要从图象文件中取出某一块,显示在画面上,怎么做? 如何实现打印预览的自由放大? 请问下,使用JSONCPP出现的问题? 请教一下opencv的问题? IT在西安的工资怎么样啊?大家晒晒
SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = _T("open");
ShExecInfo.lpFile = _T("D2.exe");
ShExecInfo.lpParameters = _T("-f train");
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_HIDE;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
BeginWaitCursor();
WaitForSingleObject(ShExecInfo.hProcess,INFINITE);
EndWaitCursor();
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = _T("open");
ShExecInfo.lpFile = _T("C:\\Windows\\notepad.exe");
ShExecInfo.lpParameters = NULL;
ShExecInfo.lpDirectory = NULL;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
BeginWaitCursor();
WaitForSingleObject(ShExecInfo.hProcess,INFINITE);
EndWaitCursor();这个我试了一下 没问题