Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.7 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. ipropbag.h
  5. Abstract:
  6. <abstract>
  7. --*/
  8. #ifndef _IPROPBAG_H_
  9. #define _IPROPBAG_H_
  10. #include "inole.h"
  11. // Property Bag Class
  12. class CImpIPropertyBag : public IPropertyBag {
  13. public:
  14. CImpIPropertyBag( LPUNKNOWN = NULL );
  15. virtual ~CImpIPropertyBag(void);
  16. //IUnknown members
  17. STDMETHODIMP QueryInterface(REFIID, LPVOID *);
  18. STDMETHODIMP_(ULONG) AddRef(void);
  19. STDMETHODIMP_(ULONG) Release(void);
  20. //IConnectionPoint members
  21. STDMETHODIMP Read(LPCOLESTR, VARIANT*, IErrorLog* );
  22. STDMETHODIMP Write(LPCOLESTR, VARIANT* );
  23. //Members not exposed by IPropertyBag
  24. LPTSTR GetData ( void );
  25. HRESULT LoadData ( LPTSTR pszData );
  26. private:
  27. typedef struct _param_data {
  28. _param_data* pNextParam;
  29. TCHAR pszPropertyName[MAX_PATH];
  30. VARIANT vValue;
  31. } PARAM_DATA, *PPARAM_DATA;
  32. enum eConstants {
  33. eDefaultBufferLength = 0x010000 // 64K
  34. };
  35. PPARAM_DATA FindProperty ( LPCTSTR pszPropName );
  36. void DataListAddHead ( PPARAM_DATA );
  37. PPARAM_DATA DataListRemoveHead ( void );
  38. ULONG m_cRef; //Object reference count
  39. LPUNKNOWN m_pUnkOuter; //Controlling unknown
  40. // PCPolyline m_pObj; //Containing object - assume NULL for this object
  41. LPTSTR m_pszData;
  42. DWORD m_dwCurrentDataLength;
  43. PPARAM_DATA m_plistData;
  44. };
  45. typedef CImpIPropertyBag *PCImpIPropertyBag;
  46. #endif // _IPROPBAG_H_