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.

127 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. cfshare.hxx
  5. Abstract:
  6. Contains definitions for
  7. CWinNTFSFileShareGeneralInfo,
  8. CWinNTFSFileShareBindingInfo and
  9. CWinNTFileShare
  10. Author:
  11. Ram Viswanathan (ramv) 02/15/96
  12. Revision History:
  13. --*/
  14. class CWinNTFSFileShareGeneralInfo;
  15. class CPropertyCache;
  16. class CWinNTFileShare: INHERIT_TRACKING,
  17. public ISupportErrorInfo,
  18. public IADsFileShare,
  19. public IADsPropertyList,
  20. public CCoreADsObject,
  21. public INonDelegatingUnknown,
  22. public IADsExtension
  23. {
  24. friend class CWinNTFSFileShareGeneralInfo;
  25. public:
  26. /* IUnknown methods */
  27. STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) ;
  28. STDMETHODIMP_(ULONG) AddRef(void);
  29. STDMETHODIMP_(ULONG) Release(void);
  30. // INonDelegatingUnknown methods
  31. STDMETHOD(NonDelegatingQueryInterface)(THIS_
  32. const IID&,
  33. void **
  34. );
  35. DECLARE_NON_DELEGATING_REFCOUNTING
  36. DECLARE_IDispatch_METHODS;
  37. DECLARE_ISupportErrorInfo_METHODS;
  38. DECLARE_IADs_METHODS;
  39. DECLARE_IADsFileShare_METHODS;
  40. DECLARE_IADsPropertyList_METHODS;
  41. DECLARE_IADsExtension_METHODS;
  42. //
  43. // constructor and destructor
  44. //
  45. CWinNTFileShare::CWinNTFileShare();
  46. CWinNTFileShare::~CWinNTFileShare();
  47. static HRESULT Create(LPTSTR pszADsParent,
  48. LPTSTR pszServerName,
  49. LPTSTR pszServiceName,
  50. LPTSTR pszShareName,
  51. DWORD dwObject,
  52. REFIID riid,
  53. CWinNTCredentials& Credentials,
  54. LPVOID * ppvoid
  55. );
  56. static HRESULT AllocateFileShareObject(LPTSTR pszADsParent,
  57. LPTSTR pszServerName,
  58. LPTSTR pszServiceName,
  59. LPTSTR pszShareName,
  60. CWinNTFileShare ** ppFileShare
  61. );
  62. HRESULT MarshallAndSet(LPSHARE_INFO_2 lpShareInfo2);
  63. STDMETHOD(GetInfo)(THIS_ DWORD dwApiLevel, BOOL fExplicit);
  64. STDMETHOD(ImplicitGetInfo)(void);
  65. protected:
  66. //
  67. // helper functions
  68. //
  69. HRESULT GetLevel2Info(THIS_ BOOL fExplicit);
  70. HRESULT GetLevel1Info(THIS_ BOOL fExplicit);
  71. HRESULT WinNTAddFileShare(void);
  72. CWinNTFSFileShareGeneralInfo *_pGenInfo;
  73. CAggregatorDispMgr * _pDispMgr;
  74. CADsExtMgr FAR * _pExtMgr;
  75. LPWSTR _pszShareName;
  76. LPWSTR _pszServerName;
  77. CPropertyCache * _pPropertyCache;
  78. CWinNTCredentials _Credentials;
  79. };
  80. //
  81. // helper function to delete a file share given the ObjectInfo structure
  82. //
  83. HRESULT
  84. WinNTDeleteFileShare(POBJECTINFO pObjectInfo);