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.

114 lines
3.3 KiB

  1. #ifndef _INC_DSKQUOTA_PRSHTEXT_H
  2. #define _INC_DSKQUOTA_PRSHTEXT_H
  3. ///////////////////////////////////////////////////////////////////////////////
  4. /* File: prshtext.h
  5. Description: DSKQUOTA property sheet extention declaration.
  6. Revision History:
  7. Date Description Programmer
  8. -------- --------------------------------------------------- ----------
  9. 08/15/96 Initial creation. BrianAu
  10. 06/25/98 Disabled snapin code with #ifdef POLICY_MMC_SNAPIN. BrianAu
  11. Switching to ADM-file approach to entering policy
  12. data. Keeping snapin code available in case
  13. we decide to switch back at a later time.
  14. 06/27/98 Added support for mounted volumes. BrianAu
  15. */
  16. ///////////////////////////////////////////////////////////////////////////////
  17. #ifndef _INC_DSKQUOTA_H
  18. # include "dskquota.h"
  19. #endif
  20. #ifndef _INC_DSKQUOTA_POLICY_H
  21. # include "policy.h"
  22. #endif
  23. //
  24. // Base class for all DiskQuotaControl property sheet extensions.
  25. //
  26. class DiskQuotaPropSheetExt : public IShellPropSheetExt
  27. {
  28. private:
  29. LONG m_cRef;
  30. DWORD m_dwDlgTemplateID;
  31. DLGPROC m_lpfnDlgProc;
  32. static UINT CALLBACK
  33. DiskQuotaPropSheetExt::PropSheetPageCallback(
  34. HWND hwnd,
  35. UINT uMsg,
  36. LPPROPSHEETPAGE ppsp);
  37. //
  38. // Prevent copying.
  39. //
  40. DiskQuotaPropSheetExt(const DiskQuotaPropSheetExt&);
  41. DiskQuotaPropSheetExt& operator = (const DiskQuotaPropSheetExt&);
  42. protected:
  43. CVolumeID m_idVolume;
  44. HPROPSHEETPAGE m_hPage;
  45. PDISKQUOTA_CONTROL m_pQuotaControl;
  46. INT m_cOleInitialized;
  47. //
  48. // Subclasses can act on these notifications if they wish.
  49. // These are called from PropSheetPageCallback().
  50. //
  51. virtual UINT OnPropSheetPageCreate(LPPROPSHEETPAGE ppsp)
  52. { return 1; }
  53. virtual VOID OnPropSheetPageRelease(LPPROPSHEETPAGE ppsp) { }
  54. HRESULT GetQuotaController(IDiskQuotaControl **ppqc);
  55. public:
  56. DiskQuotaPropSheetExt(VOID);
  57. //
  58. // Need to call subclass destructor when Release()
  59. // destroys "this".
  60. //
  61. virtual ~DiskQuotaPropSheetExt(VOID);
  62. HRESULT Initialize(const CVolumeID& idVolume,
  63. DWORD dwDlgTemplateID,
  64. DLGPROC lpfnDlgProc);
  65. //
  66. // IUnknown methods.
  67. //
  68. STDMETHODIMP
  69. QueryInterface(
  70. REFIID,
  71. LPVOID *);
  72. STDMETHODIMP_(ULONG)
  73. AddRef(
  74. VOID);
  75. STDMETHODIMP_(ULONG)
  76. Release(
  77. VOID);
  78. //
  79. // IShellPropSheetInit methods.
  80. //
  81. STDMETHODIMP
  82. AddPages(
  83. LPFNADDPROPSHEETPAGE lpfnAddPage,
  84. LPARAM lParam);
  85. STDMETHODIMP
  86. ReplacePage(
  87. UINT uPageID,
  88. LPFNADDPROPSHEETPAGE lpfnAddPage,
  89. LPARAM lParam)
  90. { return E_NOTIMPL; }
  91. };
  92. #endif // _INC_DSKQUOTA_PRSHTEXT_H