Re: How to patch overload function/method?
- From: Florent Ouchet <outchy@xxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 31 Dec 2007 11:55:16 +0100
Chau Chee Yang a écrit :
I am confuse here. There seems to be 2 ways of patching:
1. To Patch function or procedure
2. To Patch methods in class
An unit function can be represented as a single pointer (the address of the code), an object function need 2 pointers to be stored (the instance of the object and the address of the code - this record is called a closure). That why you cannot assign an unit function to an object event and vise-versa:
type
TMyObjectFunc = procedure of object; // this type is a record of 2 pointers
TMyUnitFunc = procedure; // this type is a single pointer
While patching an object method, you just want to patch its code, not its instance, that's why you'll have to select the Code field :)
- Florent
.
- References:
- How to patch overload function/method?
- From: Chau Chee Yang
- Re: How to patch overload function/method?
- From: Florent Ouchet
- Re: How to patch overload function/method?
- From: Chau Chee Yang
- How to patch overload function/method?
- Prev by Date: Re: How to patch overload function/method?
- Next by Date: Re: Delphi 5 to Delphi 2007 - was: FastCode Reference Compilers
- Previous by thread: Re: How to patch overload function/method?
- Next by thread: Re: How to patch overload function/method?
- Index(es):