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.

178 lines
3.9 KiB

  1. /*++
  2. (c) 1998 Seagate Software, Inc. All rights reserved.
  3. Module Name:
  4. PrDrive.h
  5. Abstract:
  6. Base file for HSM shell extensions on drives
  7. Author:
  8. Art Bragg [abragg] 04-Aug-1997
  9. Revision History:
  10. --*/
  11. #ifndef __PRDRIVE_H_
  12. #define __PRDRIVE_H_
  13. #define NO_STATE 0
  14. #define REMOTE 1
  15. #define NO_FSA 2
  16. #define NOT_MANAGED 3
  17. #define MANAGED 4
  18. #define MULTI_SELECT 5
  19. #define NOT_NTFS 6
  20. #define NOT_ADMIN 7
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CPrDrive
  23. class CPrDrive :
  24. public CComCoClass<CPrDrive, &CLSID_PrDrive>,
  25. public IShellPropSheetExt,
  26. public IShellExtInit,
  27. public CComObjectRoot
  28. {
  29. public:
  30. DECLARE_REGISTRY_RESOURCEID( IDR_PRDRIVE )
  31. DECLARE_NOT_AGGREGATABLE( CPrDrive )
  32. CPrDrive() { };
  33. BEGIN_COM_MAP(CPrDrive)
  34. COM_INTERFACE_ENTRY(IShellPropSheetExt)
  35. COM_INTERFACE_ENTRY(IShellExtInit)
  36. END_COM_MAP()
  37. protected:
  38. CComPtr<IDataObject> m_pDataObj;
  39. public:
  40. // IShellExtInit
  41. STDMETHOD( Initialize ) (
  42. LPCITEMIDLIST pidlFolder,
  43. IDataObject * lpdobj,
  44. HKEY hkeyProgID
  45. );
  46. // IShellPropSheetExt
  47. STDMETHOD( AddPages ) (
  48. LPFNADDPROPSHEETPAGE lpfnAddPage,
  49. LPARAM lParam );
  50. STDMETHOD( ReplacePage ) (
  51. UINT uPageID,
  52. LPFNADDPROPSHEETPAGE lpfnReplacePage,
  53. LPARAM lParam );
  54. };
  55. /////////////////////////////////////////////////////////////////////////////
  56. // CPrDrivePg dialog
  57. class CPrDrivePg : public CPropertyPage
  58. {
  59. // Construction
  60. public:
  61. CPrDrivePg();
  62. ~CPrDrivePg();
  63. // Dialog Data
  64. //{{AFX_DATA(CPrDrivePg)
  65. enum { IDD = IDD_PRDRIVE };
  66. CEdit m_editSize;
  67. CEdit m_editLevel;
  68. CEdit m_editTime;
  69. CSpinButtonCtrl m_spinTime;
  70. CSpinButtonCtrl m_spinSize;
  71. CSpinButtonCtrl m_spinLevel;
  72. UINT m_accessTime;
  73. UINT m_hsmLevel;
  74. DWORD m_fileSize;
  75. //}}AFX_DATA
  76. // Overrides
  77. // ClassWizard generate virtual function overrides
  78. //{{AFX_VIRTUAL(CPrDrivePg)
  79. public:
  80. virtual BOOL OnApply();
  81. protected:
  82. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  83. //}}AFX_VIRTUAL
  84. // Implementation
  85. protected:
  86. static UINT CALLBACK PropPageCallback( HWND hWnd, UINT uMessage, LPPROPSHEETPAGE ppsp );
  87. // Generated message map functions
  88. //{{AFX_MSG(CPrDrivePg)
  89. virtual BOOL OnInitDialog();
  90. afx_msg void OnChangeEditAccess();
  91. afx_msg void OnChangeEditLevel();
  92. afx_msg void OnChangeEditSize();
  93. afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  94. afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);
  95. //}}AFX_MSG
  96. DECLARE_MESSAGE_MAP()
  97. public:
  98. LPFNPSPCALLBACK m_pMfcCallback; // Original MFC callback from psp
  99. int m_nState;
  100. CComPtr<IFsaResource> m_pFsaResource;
  101. protected:
  102. CString m_pszHelpFilePath;
  103. };
  104. /////////////////////////////////////////////////////////////////////////////
  105. // CPrDriveXPg dialog
  106. class CPrDriveXPg : public CPropertyPage
  107. {
  108. // Construction
  109. public:
  110. CPrDriveXPg();
  111. ~CPrDriveXPg();
  112. // Dialog Data
  113. //{{AFX_DATA(CPrDriveXPg)
  114. enum { IDD = IDD_PRDRIVEX };
  115. CString m_szError;
  116. //}}AFX_DATA
  117. // Overrides
  118. // ClassWizard generate virtual function overrides
  119. //{{AFX_VIRTUAL(CPrDriveXPg)
  120. public:
  121. protected:
  122. //}}AFX_VIRTUAL
  123. // Implementation
  124. protected:
  125. static UINT CALLBACK PropPageCallback( HWND hWnd, UINT uMessage, LPPROPSHEETPAGE ppsp );
  126. // Generated message map functions
  127. //{{AFX_MSG(CPrDriveXPg)
  128. virtual BOOL OnInitDialog();
  129. //}}AFX_MSG
  130. DECLARE_MESSAGE_MAP()
  131. public:
  132. LPFNPSPCALLBACK m_pMfcCallback; // Original MFC callback from psp
  133. int m_nState;
  134. };
  135. #endif //__PRDRIVE_H_