delphi - 如何在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;
解决方案
推荐阅读
- mysql - MYSQL,使用带有 JSON_TABLE 的函数参数或变量导致错误 1049 (42000):未知数据库
- pandas - Pandas 转换:一对多关系到一对一
- mule - Mule 将数组之一展平,其中一个数组为空
- html - 左右对齐文本
- javascript - 我的太空侵略者游戏命中检测不起作用,因为子弹的 x 和 y 位置尽管已定义但“未定义”
- angular-cli - 自定义 Angular 原理图不会生成新的工作区
- .net - 我可以取两个 .NET 代码覆盖率结果的差值吗?
- php - WordPress:使用 CloudFlare 根据国家 IP 重定向到 URL
- http - 发出自定义发布请求时出现 400 错误请求
- swift - 精灵位置检测延迟