ShellExecute(NulL,NulL,TEXT ( ".\dpinstx86.exe" ),SW_SHOWnorMAL);
在上面的例子中,我想要“dpinstx86.exe”的返回值.
@H_403_7@解决方法 使用ShellExecuteEx
取代过程句柄,并使用 GetExitCodeProcess
获取退出代码. SHELLEXECUTEINFO ShExecInfo = {0};ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;ShExecInfo.hwnd = NulL;ShExecInfo.lpVerb = NulL;ShExecInfo.lpfile = "c:\MyProgram.exe"; ShExecInfo.lpParameters = ""; ShExecInfo.lpDirectory = NulL;ShExecInfo.nShow = SW_SHOW;ShExecInfo.hInstApp = NulL; ShellExecuteEx(&ShExecInfo);WaitForSingleObject(ShExecInfo.hProcess,INFINITE);总结
以上是内存溢出为你收集整理的c – 如何获取ShellExecute调用的exe的返回值全部内容,希望文章能够帮你解决c – 如何获取ShellExecute调用的exe的返回值所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)