Source code of Windows XP (NT5)
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.

113 lines
2.8 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corp., 1992 **/
  4. /**********************************************************************/
  5. /*
  6. Owner.hxx
  7. This file contains the class definition for the Take Ownership dialog.
  8. FILE HISTORY:
  9. Johnl 12-Feb-1992
  10. */
  11. #ifndef _OWNER_HXX_
  12. #define _OWNER_HXX_
  13. #include <uimsg.h>
  14. #define CID_OWNER_BASE (100)
  15. /* Ownership control IDs
  16. */
  17. #define SLT_OWNER (CID_OWNER_BASE+2)
  18. #define SLE_OWNER_NAME (CID_OWNER_BASE+3)
  19. #define SLT_OWNER_RESOURCE_TYPE (CID_OWNER_BASE+4)
  20. #define SLE_OWNER_RESOURCE_NAME (CID_OWNER_BASE+5)
  21. #define BUTTON_TAKE_OWNERSHIP (CID_OWNER_BASE+6)
  22. #define SLT_X_OBJECTS_SELECTED (CID_OWNER_BASE+8)
  23. #ifndef RC_INVOKED
  24. /*************************************************************************
  25. NAME: TAKE_OWNERSHIP_DLG
  26. SYNOPSIS: Dialog class for the take ownership dialog.
  27. INTERFACE:
  28. PARENT: DIALOG_WINDOW
  29. USES: SLT,SLE
  30. CAVEATS:
  31. NOTES:
  32. HISTORY:
  33. Johnl 12-Feb-1992 Created
  34. beng 06-Apr-1992 Unicode conversion
  35. **************************************************************************/
  36. class TAKE_OWNERSHIP_DLG : public DIALOG_WINDOW
  37. {
  38. private:
  39. SLT _sltResourceType ;
  40. SLE _sleResourceName ; // Read only SLE
  41. SLT _sltOwner ;
  42. SLE _sleOwnerName ;
  43. SLT _sltXObjectsSelected ;
  44. PUSH_BUTTON _buttonTakeOwnership ;
  45. PUSH_BUTTON _buttonOK ;
  46. const TCHAR * _pszServer ; // Where the resource lives
  47. PSECURITY_DESCRIPTOR _psecdescOriginal ;
  48. NLS_STR _nlsHelpFileName ; // Help file name
  49. ULONG _ulHelpContext ; // Help Context
  50. protected:
  51. virtual ULONG QueryHelpContext( void ) ;
  52. virtual const TCHAR * QueryHelpFile( ULONG ulHelpContext ) ;
  53. virtual BOOL OnCommand( const CONTROL_EVENT & event ) ;
  54. public:
  55. TAKE_OWNERSHIP_DLG( const TCHAR * pszDialogName,
  56. HWND hwndParent,
  57. const TCHAR * pszServer,
  58. UINT uiCount,
  59. const TCHAR * pchResourceType,
  60. const TCHAR * pchResourceName,
  61. PSECURITY_DESCRIPTOR psecdesc,
  62. PSED_HELP_INFO psedhelpinfo
  63. ) ;
  64. ~TAKE_OWNERSHIP_DLG() ;
  65. /* The security descriptor will have the process's owner set as this
  66. * resource's owner, and the group of the original security descriptor
  67. * set as this security descriptor's group.
  68. */
  69. virtual APIERR OnTakeOwnership( const OS_SECURITY_DESCRIPTOR & ossecdescNewOwner ) ;
  70. } ;
  71. #endif //RC_INVOKED
  72. #endif //_OWNER_HXX_