Does Windows have its own 'call other .exe' function (C++)

天涯浪子 提交于 2019-12-20 07:22:27

问题


I know in C++ there is a function

system("example.exe");

that runs another program, put it requires the include stdlib.h.

Because I am already including 'windows.h', is there an equivilant to the system() function in Windows?


回答1:


There is CreateProcess to run a specific executable, or ShellExecute to run programs or open documents with their associated program.

If portability to other platforms is any issue at all, I'd stick with system. #including stdlib.h won't kill you ;)




回答2:


Check the MSDN page for CreateProcess for more information




回答3:


I think you're looking for CreateProcess?



来源:https://stackoverflow.com/questions/1463040/does-windows-have-its-own-call-other-exe-function-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!