如何在Classes.pas中修补方法 [英] How to patch a method in Classes.pas

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

问题描述

我需要在Classes.pas中修补一个方法

I need to patch a method in Classes.pas

(TReader.ReadString - 我想强制它使用指定的代码页,而不是系统默认)。

(TReader.ReadString - I want to force it to use a specified codepage, not the system default).

如果我将Classes.pas复制到我的项目中,我将最终不得不重建整个VCL。有没有(简单)方式在运行时修补方法?

If I copy Classes.pas into my project,I will end up having to rebuild the entire VCL. Is there any (easy) way to patch a method at runtime?

推荐答案

我发现VCLFixPatch:

I found VCLFixPatch:

http://andy.jgknet.de/blog/?page_id=288

我使用这种技术来替换我想在运行时修补的方法。

I used the techniques from this to replace the method I wanted to patch at runtime.

这篇关于如何在Classes.pas中修补方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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