Vote UpVote

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): ...
Favorite? Off-Topic? Chris Rolliston @ 2011-12-18 08:21


Visits: 658
Votes: 3
Favorites: 1
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Jeroen Pluimers
Jørn E. Angeltveit
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)