如何编辑dll档案? [英] how to edit dll archives?

查看:24
本文介绍了如何编辑dll档案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,所以我对 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档案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆