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.

59 lines
1.9 KiB

  1. #ifndef _INC_PROPBCKT_H
  2. #define _INC_PROPBCKT_H
  3. #include <msoeprop.h>
  4. typedef struct tagPROPNODE
  5. {
  6. union
  7. {
  8. LPSTR psz;
  9. PROPID id;
  10. };
  11. int iProp;
  12. } PROPNODE;
  13. #define IsPropId(_psz) (0 == (0xffff0000 & (DWORD)PtrToUlong(_psz)))
  14. #define SzToPropId(_psz) ((PROPID)PtrToUlong(_psz))
  15. class CPropertyBucket : public IPropertyBucket
  16. {
  17. public:
  18. // ----------------------------------------------------------------------------
  19. // Construction
  20. // ----------------------------------------------------------------------------
  21. CPropertyBucket(void);
  22. ~CPropertyBucket(void);
  23. // -------------------------------------------------------------------
  24. // IUnknown Members
  25. // -------------------------------------------------------------------
  26. STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppv);
  27. STDMETHODIMP_(ULONG) AddRef(void);
  28. STDMETHODIMP_(ULONG) Release(void);
  29. // -------------------------------------------------------------------
  30. // IPropertyBucket Members
  31. // -------------------------------------------------------------------
  32. STDMETHODIMP GetProperty(LPCSTR pszProp, LPPROPVARIANT pVar, DWORD dwReserved);
  33. STDMETHODIMP SetProperty(LPCSTR pszProp, LPCPROPVARIANT pVar, DWORD dwReserved);
  34. private:
  35. LONG m_cRef;
  36. CRITICAL_SECTION m_cs;
  37. PROPNODE *m_pNodeId;
  38. int m_cNodeId;
  39. int m_cNodeIdBuf;
  40. PROPNODE *m_pNodeSz;
  41. int m_cNodeSz;
  42. int m_cNodeSzBuf;
  43. LPPROPVARIANT m_pProp;
  44. int m_cProp;
  45. int m_cPropBuf;
  46. LPPROPVARIANT GetPropVariant(LPCSTR pszProp);
  47. };
  48. #endif // _INC_PROPBCKT_H