问题描述
好的,所以我对DLL的了解并不多.但我需要编辑其中一些.看起来像存档文件的文件.例如:firefox的xul.dll,windows/twain_32.dll
okay, so i dont really know much about DLLs. but i need to edit some of them. ones that seem like archive files.such as: firefox's xul.dll, windows/twain_32.dll
当我尝试在.NET Reflector中打开它们时,它无法打开它们.在这里,一个很不满意的答案使我意识到可以使用7zip打开它们,并且似乎在其中包含文件.我可以提取文件,但不能编辑dll,而且我不知道如何创建这样的dll.我没有Visual C ++或Basic,并且我不知道是否可以使用它们.
when i tried to open them in .NET Reflector, it couldnt open them. and a really downvoted answer on here made me realize they can be opened with 7zip, and seem to have files inside.i can extract the files, but cant edit the dll, and i dont know how to create a dll like this. i dont have visual c++ or basic, and i dont know if i could do this with them.
先谢谢您,或者怎么说
推荐答案
一个dll文件通常包含程序代码(即:您不容易理解的二进制代码).某些dll文件也可能包含资源,有时可以使用资源编辑器(例如ResourceHacker)对其进行编辑.
A dll file usually contains program code (that is: binary code you can not easily understand). Some dll files may also contain resources, which can be sometimes edited with a resource editor (such as ResourceHacker).
dll文件不是存档,它们的主要用途不包括保留文件.资源通常是相当小的数据元素,例如图标.
dll files are no archives and their primary usage does not include holding files. Resources normally are rather small data elements such as icons.
如果您打开7zip中的dll文件,则会看到一些虚拟文件(不是真实文件,而是二进制对象文件的各个部分,请参见)以及虚拟文件夹 .rscs
(缩写)对于包含上述资源的资源"),您可以使用资源编辑器进行编辑.同样,请记住这些不是文件.7zip仅以您可能会想到的文件的方式显示它们.
If you open a dll file in 7zip, you will see some virtual files (which are no real files but sections of the binary object file, see symbol table and relocation table in object file for example) along with a virtual folder .rscs
(abbreviation for "resources") that contains the mentioned resources you can edit with a resource editor. Again, remember these are not files. 7zip only displays them in a way you may think of files.
.text
, .data
和 .reloc
内部的目标代码包含二进制程序代码和初始化数据以及重新分配表.除非您使用反汇编程序,否则无法编辑这些信息,可以理解所生成的汇编程序代码,了解反汇编的陷阱,进行有意义的更改并能够重新汇编代码.
The object code inside of .text
, .data
and .reloc
contains binary program code and initialization data along with the reallocation table. It makes no sense to edit those information unless you use a disassembler, can understand the generated assembler code, know about the pitfalls of disassembling, make senseful changes and are able to reassemble the code.
即使这样做,也可以将反汇编程序应用于整个目标文件,而不是单个节.
Not that even if you did so, you'd apply the disassembler to the whole object file instead of single sections.
这篇关于如何编辑dll档案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!