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.

69 lines
2.9 KiB

  1. #ifndef _INC_OPTBCKT_H
  2. #define _INC_OPTBCKT_H
  3. #include <msoeopt.h>
  4. class CPropertyBucket;
  5. #define CKEYMAX 4
  6. class COptionBucket : public IOptionBucketEx
  7. {
  8. public:
  9. // ----------------------------------------------------------------------------
  10. // Construction
  11. // ----------------------------------------------------------------------------
  12. COptionBucket(void);
  13. ~COptionBucket(void);
  14. // -------------------------------------------------------------------
  15. // IUnknown Members
  16. // -------------------------------------------------------------------
  17. STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppv);
  18. STDMETHODIMP_(ULONG) AddRef(void);
  19. STDMETHODIMP_(ULONG) Release(void);
  20. // -------------------------------------------------------------------
  21. // IPropertyBucket Members
  22. // -------------------------------------------------------------------
  23. STDMETHODIMP GetProperty(LPCSTR pszProp, LPPROPVARIANT pProp, DWORD dwReserved);
  24. STDMETHODIMP SetProperty(LPCSTR pszProp, LPCPROPVARIANT pProp, DWORD dwReserved);
  25. // -------------------------------------------------------------------
  26. // IOptionBucket Members
  27. // -------------------------------------------------------------------
  28. STDMETHODIMP ValidateProperty(PROPID id, LPCPROPVARIANT pProp, DWORD dwReserved);
  29. STDMETHODIMP GetPropertyDefault(PROPID id, LPPROPVARIANT pProp, DWORD dwReserved);
  30. STDMETHODIMP GetPropertyInfo(PROPID id, PROPINFO *pInfo, DWORD dwReserved);
  31. // -------------------------------------------------------------------
  32. // IOptionBucketEx Members
  33. // -------------------------------------------------------------------
  34. STDMETHODIMP Initialize(LPCOPTBCKTINIT pInit);
  35. STDMETHODIMP ISetProperty(HWND hwnd, LPCSTR pszProp, LPCPROPVARIANT pVar, DWORD dwFlags);
  36. STDMETHODIMP SetNotification(IOptionBucketNotify *pNotify);
  37. STDMETHODIMP EnableNotification(BOOL fEnable);
  38. STDMETHODIMP_(LONG) GetValue(LPCSTR szSubKey, LPCSTR szValue, DWORD *ptype, LPBYTE pb, DWORD *pcb);
  39. STDMETHODIMP_(LONG) SetValue(LPCSTR szSubKey, LPCSTR szValue, DWORD type, LPBYTE pb, DWORD cb);
  40. private:
  41. LONG m_cRef;
  42. CPropertyBucket *m_pProp;
  43. IOptionBucketNotify *m_pNotify;
  44. BOOL m_fNotify;
  45. PROPID m_idNotify;
  46. LPCOPTIONINFO m_rgInfo;
  47. int m_cInfo;
  48. HKEY m_hkey;
  49. LPSTR m_pszRegKeyBase;
  50. LPSTR m_rgpszRegKey[CKEYMAX];
  51. int m_cpszRegKey;
  52. LPCOPTIONINFO GetOptionInfo(LPCSTR pszProp);
  53. };
  54. #endif // _INC_OPTBCKT_H