Jump to content
  • Advertisement
Sign in to follow this  
johnnyBravo

c++, How to run an executable from my program? and then close the opened program?

This topic is 4735 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

Hi, in c++, I want to run an executable from my program, and also be able to close the opened program aswell. What api would i use? thanks

Share this post


Link to post
Share on other sites
Advertisement
If you're developing for windows, the Win32 API of course. The CreateProcess() function will allow you to launch the seperate executable. If you want to close it, you simply send a WM_CLOSE message to the application using the SendMessage() function.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!