Is it possible to embed and run exe file in a Delp

2019-06-18 06:56发布

问题:

Resource files (.RES) accept any kind of binary files but if it is an exe file how can I run it?

回答1:

You would have to extract it as a file to disk and execute it.

Although you don't have to extract it to disk, as Cosmin Prund says in a comment, if you don't it requires a lot of hard work.



回答2:

http://sites.google.com/site/delphibasics/home/delphibasicssnippets/memoryexecutionunit-winxpwinvistawin7

Take a look at this memory execution unit.It allows you to execute an exe from memory without dumping it on disk.



回答3:

Yes it is possible. There is a Delphi library to do this somewhere on the web, but I cannot for the life of me remember what it's called. It allows you to execute a normal exe file no-matter where it is in memory. So you can load it into a stream, or just embed it in a resource.

I realize that my reply is a bit depressing since i dont remember the name of the library, but at least you now know that it can be done. If you google around for "execute PE exe from memory" and "Delphi" then I'm sure you will find it.



回答4:

You might want to take a look at Orean's XBundler: http://www.oreans.com/xbundler.php

I use their licensing product (WinLicense) and have been very happy with the product, their support, responsiveness and updates.

In fact, I'm about to buy XBundler so I can ship a dll securely embedded in my exe.

Tom