I need help with this program

Pages: 12
Apr 3, 2011 at 3:06am
I need to know how to use a program the I made in the program that I wrote.
Do you have any ideas?
Apr 3, 2011 at 3:17am
Please clarify.
Also did you compile and run?
Apr 3, 2011 at 3:19am
Yes
Apr 3, 2011 at 3:22am
I set a program as 1 of its resources and it successfully accepted the program as one of its resources but I don't know how to open it with that program now
Apr 3, 2011 at 3:51am
....whaaaaa? I don't even.. I think I need to brush up on my mind reading..
Apr 3, 2011 at 7:14pm
there is a program built into that program the rote.
Apr 3, 2011 at 7:17pm
Still don't get it.
Apr 3, 2011 at 7:23pm
@ OP: Are you trying to link a ".h\.cpp" or are you trying to run an executable file from the program you are writing?
Apr 3, 2011 at 7:38pm
Yes
Apr 3, 2011 at 7:39pm
That was a multiple choice question, not a yes or no.
Apr 3, 2011 at 7:39pm
But the file is built into the program
Apr 3, 2011 at 7:39pm
How, exactly?
Apr 3, 2011 at 7:40pm
So you're trying to execute an embedded app? You seem like you're in over your head. Where are you reading on how to do this?
Apr 3, 2011 at 7:45pm
I'm just experimenting with it.
Apr 3, 2011 at 7:48pm
This isn't an easy thing to do.

To make sure we're all on the same page, you're not trying to call a program with CreateProcess or anything like that right? You're actually trying to execute a second program coded within your primary one?

You need to launch a seperate thread to do this.
Apr 3, 2011 at 7:51pm
what would that three BE?
Apr 3, 2011 at 7:58pm
With the Win32 API you need to use the "CreateThread(...)" and pass it, among other things, the starting address of your second program. Actually if you read the page and just imagine that your second app is just a function then that part is pretty easy to figure out. Here's the page: http://msdn.microsoft.com/en-us/library/ms682453(VS.85).aspx

The trickey part is that you need your primary program to be loaded into memory the whole time this second thread is executing. If it quits or gets terminated then you'll get an error and you won't know where your second thread left off, unless you had a reporting component.

EDIT: Please note that your second app cannot have a "main()" function. This trips a lot of people up when they first get into this sort of thing.
Last edited on Apr 3, 2011 at 8:00pm
Apr 3, 2011 at 9:24pm
Can you give me an example ?
Apr 3, 2011 at 9:32pm
The microsoft website didn't tell me. I don't know how to get to work?
can you give me any examples please?
Apr 3, 2011 at 9:39pm
This is from trying to get it to work


502 program h:/beep.Exe
Does that make any sense ?
Pages: 12