Re: How to patch overload function/method?
- From: Florent Ouchet <outchy@xxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 31 Dec 2007 09:48:34 +0100
Chau Chee Yang a écrit :
I wish to use CodeRedirect or FastCode patcher to patch FmtBcd.pas overloaded methods/functions? How can I do that?
eg. BcdMultiply function in FmtBcd.pas
Hello,
You can filter the function you want to patch using a type:
type
TMyFunc = function (A, B: Integer) of object;
var
AMyFunc: TMyFunc;
begin
AMyFunc := @AMyObject.SomeOverLoadedMethod;
// TMyMethod is a closure, the code field has to be isolated
"PatchMethod"(TMethod(AMyFunc).Code);
end;
Regards,
Florent
.
- Follow-Ups:
- Re: How to patch overload function/method?
- From: Rudy Velthuis [TeamB]
- Re: How to patch overload function/method?
- From: Andreas Hausladen
- Re: How to patch overload function/method?
- From: Chau Chee Yang
- Re: How to patch overload function/method?
- References:
- How to patch overload function/method?
- From: Chau Chee Yang
- How to patch overload function/method?
- Prev by Date: Re: FastCode Poll - Which Functions are Used
- Next by Date: Re: Delphi 5 to Delphi 2007 - was: FastCode Reference Compilers
- Previous by thread: How to patch overload function/method?
- Next by thread: Re: How to patch overload function/method?
- Index(es):
Relevant Pages
|