Connecting Tech Pros Worldwide Forums | Help | Site Map

How to control another program using C?

Newbie
 
Join Date: Mar 2008
Posts: 1
#1: Mar 18 '08
Hi I could really use some help with this one! I am doing a final year project for a university degree and I need to write code in C/C++ to do the following

1) Open the program "code composer studio"
2) Open a project file (.pjt) within this program and run (debug) it.

Any help would be appreciated greatly. Thanx

Member
 
Join Date: Feb 2008
Posts: 121
#2: Mar 18 '08

re: How to control another program using C?


Quote:

Originally Posted by mshad84

Hi I could really use some help with this one! I am doing a final year project for a university degree and I need to write code in C/C++ to do the following

1) Open the program "code composer studio"
2) Open a project file (.pjt) within this program and run (debug) it.

Any help would be appreciated greatly. Thanx

If you are programming for windows, use ShellExecute() and if you're using linux or unix, use exec()
sicarie's Avatar
Moderator
 
Join Date: Nov 2006
Location: USA
Posts: 3,929
#3: Mar 18 '08

re: How to control another program using C?


Quote:

Originally Posted by mshad84

Hi I could really use some help with this one! I am doing a final year project for a university degree and I need to write code in C/C++ to do the following

1) Open the program "code composer studio"
2) Open a project file (.pjt) within this program and run (debug) it.

Any help would be appreciated greatly. Thanx

That sounds like a good project to use OS level API calls. I'm not familiar with "code composer studio" is that a Windows or Linux program?
Newbie
 
Join Date: Feb 2008
Posts: 28
#4: Mar 18 '08

re: How to control another program using C?


Quote:

Originally Posted by mshad84

Hi I could really use some help with this one! I am doing a final year project for a university degree and I need to write code in C/C++ to do the following

1) Open the program "code composer studio"
2) Open a project file (.pjt) within this program and run (debug) it.

Any help would be appreciated greatly. Thanx

I seem to remember VS2005 having some application called spy++ (or something with the name spy in) which gives you memory handles of controls in a program. That might help you get access to the functionality you need. However the one time I tried to use it it seemed like a total swine (not spy++ using the handles).
Reply