How can I Run( Execute ) another application( Calc.exe ) from anotherapplication in VC++?

B

babakandme

How can I Run( Execute ) another application( Calc.exe ) from another
application in VC++?
I mean, is there any API or Function to do it?

Appreciate...
 
T

Tomás Ó hÉilidhe

:
How can I Run( Execute ) another application( Calc.exe ) from another
application in VC++?
I mean, is there any API or Function to do it?

Appreciate...


http://msdn2.microsoft.com/en-us/library/bb762153.aspx


#include <shellapi.h>

int main(void)
{
ShellExecute(0,0,"calc.exe",0,0,SW_SHOWNORMAL);
}


There's also a "ShellExecuteEx" function you might want to take a look at.

That's the last platform-specific question I'll answer here -- direct
further questions to a Microsoft programming newsgroups, or send me an e-
mail and I'll help you out with any little problems.
 
J

Jack Klein

How can I Run( Execute ) another application( Calc.exe ) from another
application in VC++?
I mean, is there any API or Function to do it?

Appreciate...

Look up your compiler's documentation for the std::system() function
declared in <cstdlib>. That is the one and only possibility provided
by the C++ language. If you are interested in non-standard, platform
specific extensions, ask in a group that supports your specific
platform.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top