How to cast OleVariant to IDispatch derived?

前端 未结 1 1648
傲寒
傲寒 2021-01-27 00:55

I bring today another question that is burning my head,

I do import a DAO 3.6 type library to my delphi 7, and I start to see many interesting intefaces so I face on int

相关标签:
1条回答
  • 2021-01-27 01:21

    If I understand your question correctly, you are asking how to convert a variant to an IDispatch. Do that like this:

    IDispatch(V)
    

    In your case I think you have another type, Fields that derives from IDispatch. You can get hold of that like this:

    IDispatch(V) as Fields
    
    0 讨论(0)
提交回复
热议问题