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.

75 lines
1.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1995 - 1995.
  5. //
  6. // File: shares.hxx
  7. //
  8. // Contents: Declaration of COM object CShares
  9. //
  10. // History: 13-Dec-95 BruceFo Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #ifndef __SHARES_HXX__
  14. #define __SHARES_HXX__
  15. #include "sfolder.hxx"
  16. #include "pfolder.hxx"
  17. #include "rcomp.hxx"
  18. //////////////////////////////////////////////////////////////////////////////
  19. class CShares : public IUnknown
  20. {
  21. friend class CSharesSF;
  22. friend class CSharesPF;
  23. friend class CSharesRC;
  24. public:
  25. CShares()
  26. :
  27. m_ulRefs(0),
  28. m_pszMachine(NULL),
  29. m_pidl(NULL),
  30. m_level(0),
  31. m_pMenuBg(NULL)
  32. {
  33. AddRef();
  34. }
  35. ~CShares()
  36. {
  37. delete[] m_pszMachine;
  38. if (NULL != m_pidl)
  39. {
  40. ILFree(m_pidl);
  41. }
  42. }
  43. //
  44. // IUnknown methods
  45. //
  46. STDMETHOD(QueryInterface)(REFIID riid, LPVOID* ppvObj);
  47. STDMETHOD_(ULONG,AddRef)();
  48. STDMETHOD_(ULONG,Release)();
  49. private:
  50. // interface implementations
  51. CSharesSF m_ShellFolder;
  52. CSharesPF m_PersistFolder;
  53. CSharesRC m_RemoteComputer;
  54. // data
  55. ULONG m_ulRefs;
  56. PWSTR m_pszMachine; // machine to work on
  57. LPITEMIDLIST m_pidl;
  58. ULONG m_level; // share info level: 1 or 2
  59. IContextMenu* m_pMenuBg;
  60. };
  61. #endif // __SHARES_HXX__