PDA

View Full Version : How to embed binary resources (EXE,DLL) and execute later?



musaulker
27th March 2007, 09:41
Hello,

I have two questions:
1- How can I embed binary files (specially EXE, DLL, etc.) into my software?
2- How can I laterly execute these embedded files, or use them?

Your regards,

high_flyer
27th March 2007, 10:22
1. its called static linking
2. define 'laterly' (example would be good)

musaulker
27th March 2007, 10:40
Sorry about the wrong terminology. I'm a newbie :)

Think about I have 2 files: foo.exe and foo.dll. Foo.exe uses foo.dll
I want to create a software using QT. Say it mySoftware (mySoftware.exe).
1- I want to embed foo.exe and foo.dll to mySoftware.exe. How can I do that? Or are there another way to do such a thing?
2- I've tried to say; look at the situation 1. After I embedded successfully these files (foo.exe and foo.dll) into mySoftware, for example if a user clicks a button i want to execute foo.exe on the background.

Is it clear?

high_flyer
27th March 2007, 10:44
Then you change your exe file and compile it as a static lib.
You do the same with the DLL.
You then staticaly link them both to your Qt exe.