开发者

"Splicing" Code into a Windows Executable

I have two windows console applications that I have written in C.

I don't have the source code for either of them.

I want to produce a single .exe file that runs both.

What ar开发者_JS百科e my options?

What if the second application is .Net code instead of C? Do I need to take special steps to load the .Net runtimes?

I am aware that I'm doing something horribly wrong if I need to know the answer to this question, so don't bother pointing that out :-P


I'd just go the simple way, store both exe's as resources or as binary arrays(see bin2c), write them out as temp files at run time, then execute them(either through CreateProcess, spawn or via a system command).

The other way would be to write your own variants or reverse engineer the ones you have(just make sure to keep it legal & professional, ie: if you didn't originally write them, don't even think of profiting off them and/or not giving credits where its due)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜