计算VMT的长度
function GetVirtualMethodCount(AClass: TClass): Integer; begin Result := (PInteger(Integer(AClass) + vmtClassName)^ - (Integer(AClass) + vmtParent) - SizeOf(Pointer)) div SizeOf(Pointer); end;
http://stackoverflow.com/questions/760513/where-can-i-find-information-on-the-structure-of-the-delphi-vmt