收下来,说不定啥时候用的上。

解决方案 »

  1.   

    ////////Begin Source
    uses
      TypInfo;function GetPropList(TypeInfo: PTypeInfo; out PropList: PPropList): Integer; overload;
    begin
      Result := GetTypeData(TypeInfo)^.PropCount;
      if Result > 0 then
      begin
        GetMem(PropList, Result * SizeOf(Pointer));
        GetPropInfos(TypeInfo, PropList);
      end;
    end;function GetPropList(AObject: TObject; out PropList: PPropList): Integer; overload;
    begin
      Result := GetPropList(PTypeInfo(AObject.ClassInfo), PropList);
    end;
    //.......加两个函数//你用的是Delphi5.0