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