向DLL运行时添加文件的解决方案 [英] a solution to add file to DLL runtime

查看:166
本文介绍了向DLL运行时添加文件的解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

为什么没有任何解决方案,例如将图像添加到嵌入式资源或将文件添加到DLL运行时?

Hi all

why not any solution to add file for example image to embedded Resource or add file to DLL runtime ?

推荐答案

您为什么要这样做? Dll基本上是方法,属性,资源的集合,这些方法将被编译并存储在磁盘上.
在生产环境/客户端系统中部署任何Dll时,它都经过了测试和错误修复.修改Dll的想法可能很棘手,因为您不再控制实际部署的内容.

P.S. :当然,有多种方法可以修改Dll,但我宁愿不去研究它.
Why would you want to do that? A Dll is basically a collection of methods, properties, resourses which is complied and stores on the disk.
When you deploy any Dll in production environment/client system, it has gone through testing and bug fixes. The idea of modifying a Dll could be tricky as you no longer have control what you actually deployed.

P.S. : Ofcourse, there are ways to modify the Dll, but I would rather not look into it.


没有解决方案,因为嵌入式资源是只读的,并且在组装后无法更改创建.

编译时未知的数据必须存储在单独的文件或注册表中.

艾伦.
There is no solution because embedded resources are read only and cannot be changed after an assembly has been created.

Data that is not known at compile time must be stored either in separate files or in the registry.

Alan.


如果您对dll添加任何修改(假设程序集/dll已签名),则由于校验和失败而损坏;没办法:)
但是,如果不是签名的dll,则需要学习MS PE标头结构.因为任何更改长度/偏移都必须在标头上进行更新.如果不执行PE更新,则DLL/程序集在编辑后将变得无用.

如果您非常想隐藏代码/任何内容,请执行其他一些机制,例如加密,应用程序消耗Web服务获取代码/任何文件等

谢谢,

Kuthuparakkal
If you add any modification to a dll(assuming assembly/dll is already signed) it will get corrupted due to Checksum failure; no way :)
But if it''s not a signed dll, then you need learn MS PE header structure. Because any change length/offset has to be updated on header. If you dont do PE update then DLL/assembly will become useless after editing.

If you are so particular about hiding your code/anything, do someother mechanisms like encryption, app consumes webservice get code/anyfile etc

Thanks,

Kuthuparakkal


这篇关于向DLL运行时添加文件的解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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