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.

176 lines
3.2 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1995 - 2000.
  5. //
  6. // File: shrpage2.hxx
  7. //
  8. // Contents: "Simple Sharing" shell property page extension
  9. //
  10. // History: 06-Oct-00 jeffreys Created
  11. //
  12. //--------------------------------------------------------------------------
  13. #ifndef __SHRPAGE2_HXX__
  14. #define __SHRPAGE2_HXX__
  15. #if _MSC_VER > 1000
  16. #pragma once
  17. #endif // _MSC_VER > 1000
  18. #include "shrpage.hxx"
  19. #include <aclapi.h> // GetNamedSecurityInfo, etc.
  20. class CSimpleSharingPage : public CShareBase
  21. {
  22. DECLARE_SIG;
  23. public:
  24. //
  25. // constructor, destructor
  26. //
  27. CSimpleSharingPage();
  28. ~CSimpleSharingPage();
  29. private:
  30. //
  31. // Main page dialog procedure: non-static
  32. //
  33. virtual BOOL
  34. _PageProc(
  35. IN HWND hWnd,
  36. IN UINT msg,
  37. IN WPARAM wParam,
  38. IN LPARAM lParam
  39. );
  40. //
  41. // Window messages and notifications
  42. //
  43. virtual BOOL
  44. _OnInitDialog(
  45. IN HWND hwnd,
  46. IN HWND hwndFocus,
  47. IN LPARAM lInitParam
  48. );
  49. virtual BOOL
  50. _OnCommand(
  51. IN HWND hwnd,
  52. IN WORD wNotifyCode,
  53. IN WORD wID,
  54. IN HWND hwndCtl
  55. );
  56. virtual BOOL
  57. _OnPropertySheetNotify(
  58. IN HWND hwnd,
  59. IN LPNMHDR phdr
  60. );
  61. virtual BOOL
  62. _OnHelp(
  63. IN HWND hwnd,
  64. IN LPHELPINFO lphi
  65. );
  66. virtual BOOL
  67. _OnContextMenu(
  68. IN HWND hwnd,
  69. IN HWND hwndCtl,
  70. IN int xPos,
  71. IN int yPos
  72. );
  73. //
  74. // Other helper methods
  75. //
  76. VOID
  77. _InitializeControls(
  78. IN HWND hwnd
  79. );
  80. VOID
  81. _SetControlsFromData(
  82. IN HWND hwnd
  83. );
  84. BOOL
  85. _ReadControls(
  86. IN HWND hwnd
  87. );
  88. virtual BOOL
  89. _ValidatePage(
  90. IN HWND hwnd
  91. );
  92. virtual BOOL
  93. _DoApply(
  94. IN HWND hwnd,
  95. IN BOOL bClose
  96. );
  97. virtual BOOL
  98. _DoCancel(
  99. IN HWND hwnd
  100. );
  101. BOOL
  102. _SetFolderPermissions(
  103. IN DWORD dwLevel
  104. );
  105. BOOL
  106. _IsReadonlyShare(
  107. IN CShareInfo *pShareInfo
  108. );
  109. BOOL
  110. _UserHasPassword(
  111. VOID
  112. );
  113. #if DBG == 1
  114. VOID
  115. Dump(
  116. IN PWSTR pszCaption
  117. );
  118. #endif // DBG == 1
  119. //
  120. // Private class variables
  121. //
  122. BOOL _bSharingEnabled;
  123. BOOL _bShareNameChanged;
  124. BOOL _bSecDescChanged;
  125. BOOL _bIsPrivateVisible;
  126. BOOL _bDriveRootBlockade;
  127. DWORD _dwPermType;
  128. LPWSTR _pszInheritanceSource;
  129. };
  130. DWORD
  131. _CheckFolderType(
  132. PCWSTR pszFolder,
  133. PCWSTR pszUserSID,
  134. BOOL *pbFolderRoot,
  135. PCWSTR *ppszDefaultAcl
  136. );
  137. #define CFT_FLAG_NO_SHARING 0x00000000
  138. #define CFT_FLAG_SHARING_ALLOWED 0x00000001
  139. #define CFT_FLAG_CAN_MAKE_PRIVATE 0x00000002
  140. #define CFT_FLAG_ALWAYS_SHARED 0x00000004
  141. #define CFT_FLAG_ROOT_FOLDER 0x00000008
  142. #define CFT_FLAG_SYSTEM_FOLDER 0x00000010
  143. #endif // __SHRPAGE2_HXX__