Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to execute an exec file from my Builder c++ program 1

Status
Not open for further replies.

Guest
Hello to all,
I don't know how to execute an external program (*.exe) from my Builder c++ program.
In particular I don't know exaclty the function that I need.
I've tried with some function but I'm not able to let them work.
Some one can provide me a sample or some simple fanction to do task ?

Thanks in advance for any answer.

Bye,
Checco
 
Look at faq101-1950, faq101-1951, faq101-1952, faq101-1953, and faq101-1954. I would recommend the CreateProcess since it is the most flexiable but it also the most complex.

James P. Cottingham
-----------------------------------------
To determine how long it will take to write and debug a program, take your best estimate, multiply that by two, add one, and convert to the next higher units.
 
Thank very much for you help and indication, it is very usefull.
I've tried the raccomended "CreateProcess" but I've some trouble with the "hidden" version.
In details I receive an error (undefine symbol) on row

StartInfo.dwFlags = STARTF_USESHOWNWINDOW;

I suppose that I've to include something...but I don't know what (I'm not so skilled ...I'm a beginner).

Thank you very much.

Bye,
Checco
 
may not be the most flexible but
ShellExecute(NULL,"open","prog.exe","","",SW_SHOWDEFAULT);
is so easy peasy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top