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.

159 lines
5.0 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1996-2002 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // SmbShare.h
  7. //
  8. // Description:
  9. // Definition of the CFileShareParamsPage classes, which implement
  10. // the Parameters page for the File Share resource.
  11. // Share resources.
  12. //
  13. // Implementation File:
  14. // SmbShare.cpp
  15. //
  16. // Maintained By:
  17. // David Potter (davidp) June 28, 1996
  18. //
  19. // Notes:
  20. //
  21. /////////////////////////////////////////////////////////////////////////////
  22. #ifndef _SMBSHARE_H_
  23. #define _SMBSHARE_H_
  24. /////////////////////////////////////////////////////////////////////////////
  25. // Include Files
  26. /////////////////////////////////////////////////////////////////////////////
  27. #ifndef __cluadmex_h__
  28. #include <CluAdmEx.h>
  29. #endif
  30. #ifndef _BASEPAGE_H_
  31. #include "BasePage.h" // for CBasePropertyPage
  32. #endif
  33. /////////////////////////////////////////////////////////////////////////////
  34. // Forward Class Declarations
  35. /////////////////////////////////////////////////////////////////////////////
  36. class CFileShareParamsPage;
  37. /////////////////////////////////////////////////////////////////////////////
  38. // External Class Declarations
  39. /////////////////////////////////////////////////////////////////////////////
  40. /////////////////////////////////////////////////////////////////////////////
  41. // CFileShareParamsPage dialog
  42. /////////////////////////////////////////////////////////////////////////////
  43. class CFileShareParamsPage : public CBasePropertyPage
  44. {
  45. DECLARE_DYNCREATE(CFileShareParamsPage)
  46. // Construction
  47. public:
  48. CFileShareParamsPage(void);
  49. virtual ~CFileShareParamsPage(void);
  50. // Dialog Data
  51. //{{AFX_DATA(CFileShareParamsPage)
  52. enum { IDD = IDD_PP_FILESHR_PARAMETERS };
  53. CButton m_pbPermissions;
  54. CSpinButtonCtrl m_spinMaxUsers;
  55. CButton m_rbMaxUsers;
  56. CButton m_rbMaxUsersAllowed;
  57. CEdit m_editMaxUsers;
  58. CEdit m_editRemark;
  59. CEdit m_editPath;
  60. CEdit m_editShareName;
  61. CString m_strShareName;
  62. CString m_strPath;
  63. CString m_strRemark;
  64. DWORD m_dwCSCCache;
  65. //}}AFX_DATA
  66. CString m_strPrevShareName;
  67. CString m_strPrevPath;
  68. CString m_strPrevRemark;
  69. DWORD m_dwMaxUsers;
  70. BOOL m_bShareSubDirs;
  71. BOOL m_bHideSubDirShares;
  72. BOOL m_bIsDfsRoot;
  73. DWORD m_dwPrevMaxUsers;
  74. BOOL m_bPrevShareSubDirs;
  75. BOOL m_bPrevHideSubDirShares;
  76. BOOL m_bPrevIsDfsRoot;
  77. DWORD m_dwPrevCSCCache;
  78. const PSECURITY_DESCRIPTOR Psec(void);
  79. HRESULT SetSecurityDescriptor( IN PSECURITY_DESCRIPTOR psec );
  80. protected:
  81. enum
  82. {
  83. epropShareName,
  84. epropPath,
  85. epropRemark,
  86. epropMaxUsers,
  87. epropShareSubDirs,
  88. epropHideSubDirShares,
  89. epropIsDfsRoot,
  90. epropCSCCache,
  91. epropMAX
  92. };
  93. CObjectProperty m_rgProps[epropMAX];
  94. // Overrides
  95. public:
  96. // ClassWizard generate virtual function overrides
  97. //{{AFX_VIRTUAL(CFileShareParamsPage)
  98. public:
  99. virtual BOOL OnSetActive();
  100. protected:
  101. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  102. //}}AFX_VIRTUAL
  103. protected:
  104. virtual DWORD ScParseUnknownProperty(
  105. IN LPCWSTR pwszName,
  106. IN const CLUSPROP_BUFFER_HELPER & rvalue,
  107. IN DWORD cbBuf
  108. );
  109. virtual BOOL BApplyChanges(void);
  110. virtual BOOL BBuildPropList(IN OUT CClusPropList & rcpl, IN BOOL bNoNewProps = FALSE);
  111. DWORD ScConvertPropertyToSD(
  112. IN const CLUSPROP_BUFFER_HELPER & rvalue,
  113. IN DWORD cbBuf,
  114. IN PSECURITY_DESCRIPTOR *ppsec
  115. );
  116. virtual const CObjectProperty * Pprops(void) const { return m_rgProps; }
  117. virtual DWORD Cprops(void) const { return sizeof(m_rgProps) / sizeof(CObjectProperty); }
  118. DWORD ScCreateDefaultSD(PSECURITY_DESCRIPTOR * ppSecOut);
  119. // Implementation
  120. protected:
  121. CString m_strCaption;
  122. PSECURITY_DESCRIPTOR m_psecNT4;
  123. PSECURITY_DESCRIPTOR m_psecNT5;
  124. PSECURITY_DESCRIPTOR m_psec;
  125. PSECURITY_DESCRIPTOR m_psecPrev;
  126. // Generated message map functions
  127. //{{AFX_MSG(CFileShareParamsPage)
  128. virtual BOOL OnInitDialog();
  129. afx_msg void OnChangeRequiredField();
  130. afx_msg void OnBnClickedMaxUsers();
  131. afx_msg void OnEnChangeMaxUsers();
  132. afx_msg void OnBnClickedPermissions();
  133. afx_msg void OnBnClickedAdvanced();
  134. afx_msg void OnBnClickedCaching();
  135. //}}AFX_MSG
  136. DECLARE_MESSAGE_MAP()
  137. }; //*** class CFileShareParamsPage
  138. #endif // _SMBSHARE_H_