Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Including .exes in C

Name: Anonymous 2009-09-04 11:19

So I'm writing a program on Windows where I'd like to include an exe to run. Source for the exe isn't available. Is there a good way of doing this?

What I have currently is this: convert the exe to a character array and write it to a temporary file for calling with system or spawn. But this seems like the wrong way to go about it. At the very least, the Google has suggested named pipes might be the way to go, but I've got no idea how to work with them.

Halp?

Name: Anonymous 2009-09-04 11:30

>>2
Alright, I'll try again.

I am writing a program.
There is another program someone else has written.
I would like to run that program from my program, but its source isn't available.

The way I'm doing it now is:
Convert their program to hex.
Load it into my program as a char array.
Write that to a file at runtime.
Execute that file using system or spawn.

I don't actually need the output of that program, just the return value, which both system and spawn will give me.



>>4
Yes, like that, only the program doesn't exist in a file before I run my program. And windows supports (named) pipes but I don't know how to use them or if they're at all what I want here.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List