PROPBAG.H
资源名称:MSDN_VC98.zip [点击查看]
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:1k
源码类别:
Windows编程
开发平台:
Visual C++
- class CPropertyBagItem :
- public CObject
- {
- DECLARE_DYNAMIC( CPropertyBagItem );
- public:
- CPropertyBagItem( LPCOLESTR pszName, VARIANT* pvarValue );
- public:
- CString m_strName;
- COleVariant m_varValue;
- };
- typedef CTypedPtrList< CObList, CPropertyBagItem* > CPropertyBagItemList;
- class CPropertyBag :
- public IPropertyBag
- {
- public:
- CPropertyBag();
- ~CPropertyBag();
- POSITION GetFirstItemPosition() const;
- CPropertyBagItem* GetNextItem( POSITION& posItem ) const;
- // IUnknown
- public:
- STDMETHOD_( ULONG, AddRef )();
- STDMETHOD_( ULONG, Release )();
- STDMETHOD( QueryInterface )( REFIID iid, void** ppInterface );
- // IPropertyBag
- public:
- STDMETHOD( Read )( LPCOLESTR pszPropName, VARIANT* pvarValue,
- IErrorLog* pErrorLog );
- STDMETHOD( Write )( LPCOLESTR pszPropName, VARIANT* pvarValue );
- protected:
- ULONG m_nRefCount;
- CPropertyBagItemList m_lpItems;
- };