shri.hxx
Upload User: caisha3
Upload Date: 2013-09-21
Package Size: 208739k
Code Size: 2k
Category:

Windows Develop

Development Platform:

Visual C++

  1. //+---------------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright (C) Microsoft Corporation, 1992 - 1994.
  5. //
  6. //  File:       shri.hxx
  7. //
  8. //  Contents:   Class object encapsulating a generic "share", that may be
  9. //              realized via one or more file servers.
  10. //
  11. //  History:    8-Mar-96   BruceFo     Created
  12. //
  13. //----------------------------------------------------------------------------
  14. #ifndef __SHRI_HXX__
  15. #define __SHRI_HXX__
  16. #include "shares.h"
  17. #include "dlink.hxx"
  18. //
  19. // Note on memory handling: This class contains strings which point into the
  20. // buffers returned by the various file server enumeration functions. Do not
  21. // free those enumeration buffers until objects of this class are freed.
  22. //
  23. class CShare : public CDoubleLink
  24. {
  25.     DECLARE_SIG;
  26. public:
  27.     CShare();   // create new info
  28.     ~CShare();
  29.     VOID
  30.     AddSmb(
  31.         IN SHARE_INFO_2* pInfo  // may point to level 1 info???
  32.         );
  33.     VOID
  34.     AddFpnw(
  35.         IN FPNWVOLUMEINFO* pInfo
  36.         );
  37.     VOID
  38.     AddSfm(
  39.         IN AFP_VOLUME_INFO* pInfo
  40.         );
  41.     PWSTR
  42.     GetName(
  43.         VOID
  44.         );
  45.     PWSTR
  46.     GetPath(
  47.         VOID
  48.         );
  49.     VOID
  50.     FillID(
  51.         OUT LPIDSHARE pids
  52.         );
  53. #if DBG == 1
  54.     VOID
  55.     Dump(
  56.         IN PWSTR pszCaption
  57.         );
  58. #endif // DBG == 1
  59. private:
  60.     //
  61.     // Main object data
  62.     //
  63.     DWORD               m_dwService;    // mask of SHARE_SERVICE_*
  64.     SHARE_INFO_2*       m_pSmbInfo;     // may point to level 1 info???
  65.     AFP_VOLUME_INFO*    m_pSfmInfo;
  66.     FPNWVOLUMEINFO*     m_pFpnwInfo;
  67. };
  68. #endif // __SHRI_HXX__