3 Replies - 653 Views - Last Post: 21 September 2010 - 05:34 AM Rate Topic: -----

#1 Creecher  Icon User is offline

  • I don't care
  • member icon

Reputation: 561
  • View blog
  • Posts: 2,049
  • Joined: 06-March 10

Launching other programs through C++

Posted 20 September 2010 - 10:29 AM

Is using ShellExecute() the best/only way to launch an application through C++?

Example of how I'm using it :

ShellExecute( NULL, NULL, "/OperaUSB1050/opera.exe", NULL, NULL, SW_SHOW );


I can show an entire project example if needed...

This post has been edited by NeverPool: 21 September 2010 - 05:37 AM

Is This A Good Question/Topic? 0
  • +

Replies To: Launching other programs through C++

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6066
  • View blog
  • Posts: 23,526
  • Joined: 23-August 08

Re: Launching other programs through C++

Posted 20 September 2010 - 10:48 AM

CreateProcess.
Was This Post Helpful? 1
  • +
  • -

#3 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2250
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: Launching other programs through C++

Posted 20 September 2010 - 01:31 PM

There are actually quite a number of different ways to launch other programs from within a C++ program.

Since you seem to be on windows then ShellExecute, ShellExecuteEx, CreateProcess.

There is also the old platform independent standby: system()

There are probably 2 or 3 other ways but that is what is typical in windows.
Was This Post Helpful? 1
  • +
  • -

#4 Creecher  Icon User is offline

  • I don't care
  • member icon

Reputation: 561
  • View blog
  • Posts: 2,049
  • Joined: 06-March 10

Re: Launching other programs through C++

Posted 21 September 2010 - 05:34 AM

I like that CreateProcess one, I may use that instead of ShellExecute. Thanks guys!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1