Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在第一个 exe 中,我定义了带有一些特殊字节的 char 数组作为标签,我将它从另一个 exe 映射到内存,找到所需的标签并将新数据放入其中,但是这个数据可能比定义的数组更短,所以我想剪切这个数组到需要的大小!我该怎么做?
没有精细和简单的方法来剪切 PE 文件。
明显的解决方案是length在原始(用您的术语first)exe 中另外定义一个字段并用另一个标签标记它。然后第二个 exe 的额外工作将是写入该字段的实际数据长度。
length
编辑:如果切割是您的主要目标,您还必须记住:
参考:http: //msdn.microsoft.com/en-us/library/ms809762.aspx