COM Collection Template Class - 项目摘要 |
摘要
| 管理 |
论坛 文档
| 软件包 |
|
|
|
项目描述: |
I spend a lot of my programming time writing small COM Objects with the Active Template Library, and then using them inside of Visual Basic.   One situation that I come across often is: 1) Having collections of objects, and 2) Enumerating these collections.   I initially dealt with the collection by using the VB built-in Collection class, and with Enumeration by wrapping all the requested data into a SAFEARRAY and stuffing that into a Variant.   Both of these solution felt very clumsy, so I decided to try to create a template class that would handle both the collection duties for any set of COM Objects, and provide a more efficient way to enumerate them, which meant implementing the IEnumVARIANT interface.
我花了许多时间编写使用 Active Template Library的小型COM对象,并在 Visual Basic中使用它们。我经常遇到的问题是:1)必须有集合对象;2)枚举这些集合。我最初使用VB内建的 Collection 类来处理集合,通过封装所有请求的数据到一个SAFEARRAY中来枚举,并将其插入到一个 Variant变量中。这两种方法都很复杂,所以我决定创建一个模板类来处理COM对象的集合操作,以及提供更有效的枚举集合的方法,这意味要实现 IEnumVARIANT 接口。
来源: http://www.codeguru.com/activex/comcollection.shtml |
类别: |
|
发布者:
cbd002
|
|
最新发布源码包 |
软件包 |
版本号 |
日期 |
本地下载 |
comcollection2 |
 1.0  |
2004-04-14 |
下载 |
|
|