修改运行时组件? [英] modify the assembly on runtime?

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

问题描述

如何修改内存中加载的方法给出总成,使CLR实例化时,对一些类是在它与修改code新对象的新对象?

how can i modify memory loaded methods in given assembly so that clr when instantiates new objects for some class it makes new objects with modified code in it?

推荐答案

您可以使用单塞西尔修改组件,然后再加载它。

You can use Mono Cecil to modify the assembly before you load it.

您可以修改的组件保存为一个字节数组,然后调用的Assembly.Load 加载字节数组。

You can save the modified assembly to a byte array, then call Assembly.Load to load the byte array.

这篇关于修改运行时组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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