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.

143 lines
2.8 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. cfshare.hxx
  5. Abstract:
  6. Contains definitions for
  7. CFPNWFSFileShareGeneralInfo,
  8. CFPNWFSFileShareBindingInfo and
  9. CFPNWFileShare
  10. Author:
  11. Ram Viswanathan (ramv) 02/15/96
  12. Revision History:
  13. --*/
  14. class CFPNWFSFileShareGeneralInfo;
  15. class CPropertyCache;
  16. class CFPNWFileShare: INHERIT_TRACKING,
  17. public ISupportErrorInfo,
  18. public IADsFileShare,
  19. public IADsPropertyList,
  20. public CCoreADsObject,
  21. public INonDelegatingUnknown,
  22. public IADsExtension
  23. {
  24. friend class CFPNWFSFileShareGeneralInfo;
  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. CFPNWFileShare::CFPNWFileShare();
  46. CFPNWFileShare::~CFPNWFileShare();
  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. CFPNWFileShare ** ppFileShare
  61. );
  62. STDMETHOD(GetInfo)(THIS_ DWORD dwApiLevel, BOOL fExplicit);
  63. STDMETHOD(ImplicitGetInfo)(void);
  64. //
  65. // helper functions
  66. //
  67. HRESULT MarshallAndSet(PNWVOLUMEINFO pVolumeInfo);
  68. protected:
  69. //
  70. // helper functions
  71. //
  72. HRESULT FPNWAddFileShare(void);
  73. CFPNWFSFileShareGeneralInfo *_pGenInfo;
  74. CAggregatorDispMgr * _pDispMgr;
  75. CADsExtMgr FAR * _pExtMgr;
  76. LPWSTR _pszShareName;
  77. LPWSTR _pszServerName;
  78. CPropertyCache * _pPropertyCache;
  79. CWinNTCredentials _Credentials;
  80. };
  81. //
  82. // helper function to delete a file share given the ObjectInfo structure
  83. //
  84. HRESULT
  85. FPNWDeleteFileShare(POBJECTINFO pObjectInfo);