开发者

Embedding resources in binary images / program executables / .exe?

It's been asked how to automate the task of embedding binary data into source code (Embedding resources in executable using GCC), but I would like to know whether it is possible to just write binary data into a compiled executable, i.e. without having to compile from source. My first thoug开发者_StackOverflow中文版ht would be to include a "constant variable" large enough to hold the data, but I don't know how to find out where to write the data.


The answer is YES, at least with MINGW on win32 an executable can read itself and it can be appended data. So its last few bytes can be the data's header (offset).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜