COM method offsets in Delphi

前端 未结 4 451
天涯浪人
天涯浪人 2021-01-02 09:56

In Delphi, how do I find out the the address of a COM method? I can hardcode the offsets

//0 is the offset of the QueryInterface method
p := TPonterArray(poi         


        
4条回答
  •  忘掉有多难
    2021-01-02 10:19

    I don't think Delphi supports that. Hardcoding the offsets is probably the only thing that will work, since the compiler doesn't count interface methods as symbols whose value can be assigned to a function pointer, the way object methods or standalone functions can.

    Why are you trying to do this, BTW?

提交回复
热议问题