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.

152 lines
3.5 KiB

  1. /*++
  2. Copyright (c) 1998-2000 Microsoft Corporation
  3. Module Name:
  4. rnddo.h
  5. Abstract:
  6. Definitions for CDirectoryObject class.
  7. --*/
  8. #ifndef __RNDDO_H
  9. #define __RNDDO_H
  10. #pragma once
  11. #include "rndobjsf.h"
  12. #include "rndcommc.h"
  13. #include "rndutil.h"
  14. #include "rndsec.h"
  15. #include "rndreg.h"
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CDirectoryObject
  18. /////////////////////////////////////////////////////////////////////////////
  19. class CDirectoryObject :
  20. public CComDualImpl<
  21. ITDirectoryObject,
  22. &IID_ITDirectoryObject,
  23. &LIBID_RENDLib
  24. >,
  25. public ITDirectoryObjectPrivate,
  26. public CComObjectRootEx<CComObjectThreadModel>,
  27. public CObjectSafeImpl
  28. {
  29. public:
  30. DECLARE_GET_CONTROLLING_UNKNOWN()
  31. BEGIN_COM_MAP(CDirectoryObject)
  32. COM_INTERFACE_ENTRY2(IDispatch, ITDirectoryObject)
  33. COM_INTERFACE_ENTRY(ITDirectoryObject)
  34. COM_INTERFACE_ENTRY(ITDirectoryObjectPrivate)
  35. COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pFTM)
  36. COM_INTERFACE_ENTRY(IObjectSafety)
  37. END_COM_MAP()
  38. //
  39. // ITDirectoryObject
  40. //
  41. STDMETHOD (get_ObjectType) (
  42. OUT DIRECTORY_OBJECT_TYPE * pObjectType
  43. );
  44. STDMETHOD (get_Name) (
  45. OUT BSTR *pVal
  46. ) = 0;
  47. STDMETHOD (put_Name) (
  48. IN BSTR Val
  49. ) = 0;
  50. STDMETHOD (get_DialableAddrs) (
  51. IN long dwAddressTypes, //defined in tapi.h
  52. OUT VARIANT * pVariant
  53. ) = 0;
  54. STDMETHOD (EnumerateDialableAddrs) (
  55. IN DWORD dwAddressTypes, //defined in tapi.h
  56. OUT IEnumDialableAddrs ** pEnumDialableAddrs
  57. ) = 0;
  58. STDMETHOD (GetTTL)(
  59. OUT DWORD * pdwTTL
  60. ) = 0;
  61. STDMETHOD (get_SecurityDescriptor) (
  62. OUT IDispatch ** ppSecDes
  63. );
  64. STDMETHOD (put_SecurityDescriptor) (
  65. IN IDispatch * pSecDes
  66. );
  67. //
  68. // ITDirectoryObjectPrivate
  69. //
  70. STDMETHOD (GetAttribute)(
  71. IN OBJECT_ATTRIBUTE Attribute,
  72. OUT BSTR * ppAttributeValue
  73. ) = 0;
  74. STDMETHOD (SetAttribute)(
  75. IN OBJECT_ATTRIBUTE Attribute,
  76. IN BSTR pAttributeValue
  77. ) = 0;
  78. STDMETHOD (get_SecurityDescriptorIsModified) (
  79. OUT VARIANT_BOOL * pfIsModified
  80. );
  81. STDMETHOD (put_SecurityDescriptorIsModified) (
  82. IN VARIANT_BOOL fIsModified
  83. );
  84. STDMETHOD (PutConvertedSecurityDescriptor) (
  85. IN char * pSD,
  86. IN DWORD dwSize
  87. );
  88. STDMETHOD (GetConvertedSecurityDescriptor) (
  89. OUT char ** ppSD,
  90. OUT DWORD * pdwSize
  91. );
  92. public:
  93. CDirectoryObject()
  94. : m_pIDispatchSecurity(NULL),
  95. m_fSecurityDescriptorChanged(FALSE),
  96. m_pSecDesData(NULL),
  97. m_dwSecDesSize(0),
  98. m_pFTM(NULL)
  99. {}
  100. virtual ~CDirectoryObject() {}
  101. virtual void FinalRelease(void);
  102. virtual HRESULT FinalConstruct(void);
  103. protected:
  104. CCritSection m_lock;
  105. DIRECTORY_OBJECT_TYPE m_Type;
  106. IDispatch * m_pIDispatchSecurity;
  107. BOOL m_fSecurityDescriptorChanged;
  108. PSECURITY_DESCRIPTOR m_pSecDesData;
  109. DWORD m_dwSecDesSize;
  110. IUnknown * m_pFTM; // pointer to the free threaded marshaler
  111. };
  112. #endif