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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing win apps under vc++

Status
Not open for further replies.

chameleon

Programmer
Sep 27, 2000
5
ZA
Hi I would like to know how to execute windows apps under visual c++ in code _exec I can't get to work

Please help.

Andrew [sig][/sig]
 
Dear Andrew,

if ( -1 == _execl("c:\\winnt\\notepad.exe", "c:\\winnt\\notepad.exe",
"c:\\winzip.log","",NULL))
cout << &quot;error number: &quot; << errno << endl;

That should work for you.

-pete
[sig][/sig]
 

Andrew,

You may already know this and have a reason to use _execl() but you can use ShellExecute(). Check MSDN for more info.

Brother C
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top