3
votes
Playing around with TVirtualMethodInterceptor
Delphi Haven
– Beyond bug fixes, one of the few things new to XE1 was TVirtualMethodInterceptor, a class for hooking virtual method calls made against an arbitrary object. Some months ago I had a quick try of it. Finding Barry Kelly’s example just a little too simple and abstract, I wrote my own – a (very) basic logger. The interface went like this: uses SysUtils, Classes, TypInfo, RTTI; type IVirtualMethodLogger = interface procedure StopLogging(ObjectStillAlive: Boolean = True); end; function LogVirtualMethodCalls(Obj: TObject; Output: TTextWriter; OwnOutput: Boolean = False): ...
Statistics
|
Visits by Source |
User Actions |




