從TypInfo.pas中這段代碼看起來,PTypeData是從TTypeInfo中讀取的。
function GetTypeData(TypeInfo: PTypeInfo): PTypeData; assembler;
asm
{ -> EAX Pointer to type info }
{ <- EAX Pointer to type data }
{ it's really just to skip the kind and the name }
XOR EDX,EDX
MOV DL,[EAX].TTypeInfo.Name.Byte[0]
LEA EAX,[EAX].TTypeInfo.Name[EDX+1]
end;
可是TTypeInfo中TypeData的定義已經注釋掉了。
TTypeInfo = record // TTypeInfo 是 RTTI 資訊的結構
Kind: TTypeKind; // RTTI 資訊的資料型別
Name: ShortString; // 資料型別的名稱
{TypeData: TTypeData} // RTTI 的內容
end;
請問這是怎么回事?
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/132757.html
標籤:VCL組件使用和開發
