当我读到
here时,
the VMT also contains a number of “magic” fields to support features@H_502_4@ such as parent class link,instance size,class name,dynamic method@H_502_4@ table,published methods table,published fields table,RTTI table,@H_502_4@ initialization table for magic fields,the deprecated OLE Automation@H_502_4@ dispatch table and implemented interfaces table
看起来VMT不包含包含定义类的单元名称的字段.是否涉及一些“编译魔术”?
解决方法
我不明白为什么VMT应该参与其中. TObject已经公开了一个类函数UnitName.