Leaked source code of windows server 2003
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.

86 lines
2.1 KiB

  1. /*++
  2. Copyright (C) 1993-1999 Microsoft Corporation
  3. Module Name:
  4. ipropbag.h
  5. Abstract:
  6. Header file for the private IPropertyBag interface.
  7. --*/
  8. #ifndef _IPROPBAG_H_
  9. #define _IPROPBAG_H_
  10. // Disable 64-bit warnings in atlctl.h
  11. #if _MSC_VER >= 1200
  12. #pragma warning(push)
  13. #endif
  14. #pragma warning ( disable : 4510 )
  15. #pragma warning ( disable : 4610 )
  16. #pragma warning ( disable : 4100 )
  17. #include <atlctl.h>
  18. #if _MSC_VER >= 1200
  19. #pragma warning(pop)
  20. #endif
  21. // Property Bag Class
  22. class CImpIPropertyBag:
  23. public IPropertyBag,
  24. public CComObjectRoot
  25. {
  26. public:
  27. DECLARE_NOT_AGGREGATABLE(CImpIPropertyBag)
  28. BEGIN_COM_MAP(CImpIPropertyBag)
  29. COM_INTERFACE_ENTRY(IPropertyBag)
  30. END_COM_MAP_X()
  31. CImpIPropertyBag();
  32. virtual ~CImpIPropertyBag(void);
  33. //IUnknown overrides
  34. STDMETHOD(QueryInterface) (REFIID riid, LPVOID FAR* ppvObj);
  35. STDMETHOD_(ULONG, AddRef) ();
  36. STDMETHOD_(ULONG, Release) ();
  37. //IConnectionPoint methods
  38. STDMETHOD(Read)(LPCOLESTR, VARIANT*, IErrorLog* );
  39. STDMETHOD(Write)(LPCOLESTR, VARIANT* );
  40. //Members not exposed by IPropertyBag
  41. LPWSTR GetData ( void );
  42. DWORD LoadData ( LPWSTR pszData, LPWSTR* ppszNextData = NULL );
  43. private:
  44. typedef struct _param_data {
  45. _param_data* pNextParam;
  46. WCHAR pszPropertyName[MAX_PATH+1];
  47. VARIANT vValue;
  48. } PARAM_DATA, *PPARAM_DATA;
  49. enum eConstants {
  50. eDefaultBufferLength = 8192
  51. };
  52. PPARAM_DATA FindProperty ( LPCWSTR pszPropName );
  53. void DataListAddHead ( PPARAM_DATA );
  54. PPARAM_DATA DataListRemoveHead ( void );
  55. ULONG m_cRef; //Object reference count
  56. LPUNKNOWN m_pUnkOuter; //Controlling unknown
  57. LPWSTR m_pszData;
  58. DWORD m_dwCurrentDataLength;
  59. PPARAM_DATA m_plistData;
  60. HINSTANCE m_hModule;
  61. };
  62. typedef CImpIPropertyBag *PCImpIPropertyBag;
  63. #endif // _IPROPBAG_H_