在Delphi中,如何找到COM方法的地址?
我可以硬编码偏移量
我可以硬编码偏移量
- //0 is the offset of the QueryInterface method
- p := TPonterArray(pointer(SomeInterface)^)[0];
但我更喜欢使用符号名称.以下显然不起作用:
- var M : TMethod;
- ...
- M := TMethod(SomeInterface.QueryInterface);
谢谢!