我有这个测试计划
https://gist.github.com/real-mielofon/5002732
RttiValue := RttiMethod.Invoke(RttiInstance,[10]);@H_404_3@和简单的单位与界面:
unit Unit163; interface type {$M+} ISafeIntf = interface function TestMethod(aI: integer): integer; safecall; end; {$M-} type TSafeClass = class(TInterfacedObject,ISafeIntf) public function TestMethod(aI: integer): integer; safecall; end; implementation function TSafeClass.TestMethod(aI: integer): integer; begin result := aI+1; // Exception !! end; end.@H_404_3@我有kaboom
result := aI+1;@H_404_3@如果是程序或不是safecall,那么没关系:-(