procedure _IntfCopy定义System.pas如下:
procedure _IntfCopy(var Dest: IInterface; const Source: IInterface);
Run Code Online (Sandbox Code Playgroud)
只是想知道是否可以_IntfCopy使用Delphi内联汇编程序调用过程:
procedure Test;
asm
...
call _IntfCopy;
end;
Run Code Online (Sandbox Code Playgroud)
这总是E2003 Undeclared identifier: '_IntfCopy'在编译期间产生的.
一个简单的编码:
var a, b: IInterface;
begin
a := b;
end;
Run Code Online (Sandbox Code Playgroud)
在Delphi汇编程序中生成:
mov eax,$0042481c
mov edx,[$00424820]
call @IntfCopy
Run Code Online (Sandbox Code Playgroud)
但我找不到一种方法来编写内联Delphi汇编程序来通过赋值运算符进行IInterface引用.