一.实现枚举器
typedef std::vector< std::string > ContainerType;
typedef VCUE::GenericCopy<VARIANT, ContainerType::value_type> EnumeratorCopyType;
typedef CComEnumOnSTL< IEnumVARIANT, &__uuidof(IEnumVARIANT), VARIANT,
EnumeratorCopyType, ContainerType > EnumeratorType;
二.实现ICollection
typedef VCUE::GenericCopy<BSTR, ContainerType::value_type> CollectionCopyType;
typedef ICollectionOnSTLImpl<IWords, ContainerType,BSTR,
CollectionCopyType,EnumeratorType> CollectionType;
参考:
http://blog.csdn.net/nelsonc/archive/2003/07/15/10860.aspx
http://www.cppblog.com/Robertxiao/archive/2008/10/05/63275.html