首页 > 解决方案 > 如何在delphi中将IDispatchEx类型转换为TAutoIntfObject

问题描述

如何在 delphi 中将 IDispatchEx 类型转换为 TAutoIntfObject。

var
    ValueEx: IDispatchEx;
    MyPropertyValue: Variant;
    AutoObj: TAutoIntfObject; 
begin
    Supports( IDispatch(MyPropertyValue), IDispatchEx, ValueEx );
    AutoObj := ValueEx as TAutoIntfObject; ---> this line occured error
end;

标签: delphi

解决方案


推荐阅读