本文介绍了ShellExecuteEx返回代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以告诉我如何从使用shellExecuteEx()调用的批处理文件中获取返回代码。



Can someone tell me how to get the return code from a batch file that is called using shellExecuteEx().

SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = pathName;
ShExecInfo.lpParameters = "";
ShExecInfo.lpDirectory = newString;
ShExecInfo.nShow = SW_SHOW;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);
WaitForSingleObject(ShExecInfo.hProcess,INFINITE);





谢谢,



Randy



Thanks,

Randy

推荐答案


这篇关于ShellExecuteEx返回代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 06:09