如何编辑或修改dll [英] how to edit or modify a dll

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

问题描述

是否可以在Visual Studio中修改引用的dll?如果是,如何?

Is it possible to modify a referenced dll in visual studio? If yes, How?

推荐答案

是.
如果您有源代码,那么这很容易,而且很明显.
如果您不这样做,则有可能,但是要困难得多,尤其是如果他们对自己的代码进行了模糊处理以防止人们窃取他们的代码.
Yes.
If you have the source code, it''s easy, and pretty obvious.
If you don''t, it is possible, but much harder, particularly if they have obfuscated their code to prevent people stealing their code.


1.保存Reflector给您的代码到文件系统
2.从这些文件创建一个项目
3.编译项目
4.验证编译后的DLL是否仍与原始DLL相同.
5.编辑源代码以添加/更改您想要/需要的任何功能
6.编译
7.检查添加/更改的功能的有效性
8.涂抹5. 6. 7.引起恶心或直到获得期望的结果
9.使用新的DLL而不是以前使用过的DLL.

干杯,
Manfred
1. Save the code Reflector gave you to the file system
2. Create a project from these files
3. Compile the project
4. Verify that your compiled DLL still functions the same as the original one.
5. Edit the source code to add/change whatever functionality you want/need
6. Compile
7. Check for validity of the added/changed functionality
8. Apply 5. 6. 7. ad nauseam or until desired result is achieved
9. Use the new DLL instead of the old one where you previously used it.

Cheers,
Manfred


取决于您的意思是修改"-是的.

有时可能需要进行修改,以使dll强命名.
对于此类修改,请使用 ILMerge .

或者,您可能需要在某些方面装饰dll.如果要这样做,并且您具有正确的Visual Studio版本,则可以使用 VSInstr 及其同伴以跟踪函数调用等.

或者,如果足够复杂,则可以使用 ildasm & ilasm 并在;-)之间打补丁>
干杯
安迪
Depends on what you mean be "modify" - Yes.

A modification that might be needed some times is to make a dll strong named.
For such modification, use ILMerge.

Or you might want to decorate the dll with some aspects. If you want to do that, and if you have the right version of Visual Studio, you might use VSInstr and its companions for tracing function calls, etc.

Or, if sufficiently sophisticated, you might use ildasm & ilasm and patch the code in between ;-)

Cheers
Andi


这篇关于如何编辑或修改dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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