怎样通过RTTI取得类中published定义的方法 我在类中pulished 部分定义一个name方法我想通过在运行中读出类中的所有的方法信息(方法名,参数类型等)...高手指点 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用TObject的类方法MethodAddress方法. 当然类中不只有name这个方法,我只是想要取出一个类中所有方法的处理 //参考如下代码:type PVmtMethod = ^TVmtMethod; TVmtMethod = packed record Size: Word; Address: Pointer; Name: ShortString; end; PVmtMethodTable = ^TVmtMethodTable; TVmtMethodTable = packed record Count: Word; Methods: array [0..MaxListSize] of Char; end;procedure TForm1.Button2Click(Sender: TObject);var vMethodTable: PVmtMethodTable; vMethod: PVmtMethod; vSize: Integer; I: Integer;begin vMethodTable := PPointer(PInteger(Self)^ + vmtMethodTable)^; Memo1.Clear; vSize := 0; for I := 0 to vMethodTable^.Count - 1 do begin vMethod := @vMethodTable^.Methods[vSize]; Memo1.Lines.Add(vMethod^.Name); Inc(vSize, vMethod^.Size); end;end; 關於Twebbrowser的execScript()用法 请问怎样将几个不同表格的数据放在一个公式中计算并将结果显示在edit中 ado的程序写完后,我怎样让程序最简单的发布使用 刚装了台机器,感觉配置不太对劲,我又不动硬件。请问网上有没有检测电脑硬件配置参数的工具啊,并给出网址。谢谢! 关于毕业设计的问题 真的好难 ! IBM 面试试题,有谁知道答案? 怎样在程序中执行另一个程序 各位高手:如何删除IE的自动完成内容(程序) 菜鸟问题(1):从网上下载的Delphi控件如何使用? 如何在Microsoft Agent中的动画精灵上面添加右键菜单哪? AdvStringGrid格式化问题
type
PVmtMethod = ^TVmtMethod;
TVmtMethod = packed record
Size: Word;
Address: Pointer;
Name: ShortString;
end;
PVmtMethodTable = ^TVmtMethodTable;
TVmtMethodTable = packed record
Count: Word;
Methods: array [0..MaxListSize] of Char;
end;procedure TForm1.Button2Click(Sender: TObject);
var
vMethodTable: PVmtMethodTable;
vMethod: PVmtMethod;
vSize: Integer;
I: Integer;
begin
vMethodTable := PPointer(PInteger(Self)^ + vmtMethodTable)^;
Memo1.Clear;
vSize := 0;
for I := 0 to vMethodTable^.Count - 1 do
begin
vMethod := @vMethodTable^.Methods[vSize];
Memo1.Lines.Add(vMethod^.Name);
Inc(vSize, vMethod^.Size);
end;
end;