Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

kindfluffysteve

launching an .exe

This topic is 5586 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

is there some command to launch and .exe from a c program and sort of wait for it to return? I''ve typed stuff into google and msdn but cant seem to find what I''m looking for.

Share this post


Link to post
Share on other sites
Advertisement
Actually it''s:

system("command parameter1 parameter2");

However, CreateProcess() is the recommended way to launch programs from within a Windows program. For regular console applications, system() is ok.

Share this post


Link to post
Share on other sites
For system() use process.h. CreateProcess() is included automatically by windows.h.

If you''re using MSVC, check out the help system. It will tell you what header you need to include for a particular function.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
is that only for use with GUIs, or can you do that with console-c

Share this post


Link to post
Share on other sites
quote:
Original post by The Heretic
Actually system() isin stdlib.h...


It''s in both, but Microsoft recommends process.h.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!