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

running a program from my program

Status
Not open for further replies.

Oita01

Programmer
Jan 22, 2005
6
US
I've written a program that creates customized assembly files. At this point I want program to run my assembler, perhaps using:
system("start c:\\assembler_program.exe").
If there's a way to run it, say...
...in the background, it would be best. How does my program enter info as if from the keyboard?

Thank you for any help,
:)
 
If you want to run it "in the background" and continue doing other things, just run it in a separate thread.
Look at the CWinThread::CreateThread() function...
 
Doesn't MFC support fork() and the exec* functions?

A thread with a call system() would work as well.
 
Oita01 use CreateProcess

Ion Filipski
1c.bmp
 
OK, I guess I'm more of a newbie than I think. I've learned C++ at school ( as a CS minor) and have never seen functions such as CreateProcess or CWinThread; seems the focus was all using the STL and a lot on various data structures. I did, in this case, learn to use the system() function to solve the immediate problem. Thanks!

Does anyone know a good way to learn these subjects I'm missing out on? i.e. Books, websites, etc...

Thanks again,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top