开发者

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

开发者 https://www.devze.com 2023-03-30 15:41 出处:网络
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

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

精彩评论

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