从 ATL ActiveX 控件返回对象数组 [英] Return Array of object from ATL ActiveX Control
本文介绍了从 ATL ActiveX 控件返回对象数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个现有的 ActiveX 控件,我需要添加一个返回对象数组的方法.对象是我需要创建的类型,如何返回对象数组?
I have an existing ActiveX control that I need to add a method that returns an array of objects. the object is a type that I need to create, how do I go about returning an array of objects ?
推荐答案
您返回一个安全数组或 - 我的偏好 - 保存安全数组的变体值,例如变体数组.各种 ActiveX 托管环境(包括脚本语言)都很好地认识到这一点.
You return a safe array or - my preference - a variant value holding safe array, e.g. array of variants. This is well recognized by various ActiveX hosting environments, including scripting languages.
- 如何在ATL COM中创建Variant Array并传回VB
- 使用 COM 传递数组
- 从 ATL 服务器返回 VARIANT 数组
- 带有变体数组 [out] 参数的 atl 对象不适用于脚本
- 从自定义 activex 函数获取数组立>
- 将 VARIANT 从 COM 编组回 C++ 客户端一个>
这篇关于从 ATL ActiveX 控件返回对象数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文