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.

69 lines
2.3 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2001 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // StandardInfo.h
  7. //
  8. // Description:
  9. // CStandardInfo implementation.
  10. //
  11. // Maintained By:
  12. // Galen Barbee (GalenB) 22-NOV-1999
  13. //
  14. //////////////////////////////////////////////////////////////////////////////
  15. #pragma once
  16. class CObjectManager;
  17. // Link list of extension object that are persisted.
  18. typedef struct _ExtObjectEntry {
  19. struct _ExtObjectEntry * pNext; // Next item in list
  20. CLSID iid; // Interface ID
  21. IUnknown * punk; // Punk to object
  22. } ExtObjectEntry;
  23. // CStandardInfo
  24. class CStandardInfo
  25. : public IStandardInfo
  26. {
  27. friend class CObjectManager;
  28. private:
  29. // IUnknown
  30. LONG m_cRef;
  31. // IStandardInfo
  32. CLSID m_clsidType; // Type of object
  33. OBJECTCOOKIE m_cookieParent; // Parent of object (if any - NULL means none)
  34. BSTR m_bstrName; // Name of object
  35. HRESULT m_hrStatus; // Object status
  36. IConnectionInfo * m_pci; // Connection to the object (used by Connection Manager)
  37. ExtObjectEntry * m_pExtObjList; // List of extended objects
  38. private: // Methods
  39. CStandardInfo( void );
  40. CStandardInfo( CLSID * pclsidTypeIn,
  41. OBJECTCOOKIE cookieParentIn,
  42. BSTR bstrNameIn
  43. );
  44. ~CStandardInfo( void );
  45. STDMETHOD( HrInit )( void );
  46. public: // Methods
  47. static HRESULT S_HrCreateInstance( IUnknown ** ppunkOut );
  48. // IUnknown
  49. STDMETHOD( QueryInterface )( REFIID riidIn, LPVOID * ppvOut );
  50. STDMETHOD_( ULONG, AddRef )( void );
  51. STDMETHOD_( ULONG, Release )( void );
  52. // IStandardInfo
  53. STDMETHOD( GetType )( CLSID * pclsidTypeOut );
  54. STDMETHOD( GetName )( BSTR * bstrNameOut );
  55. STDMETHOD( SetName )( LPCWSTR pcszNameIn );
  56. STDMETHOD( GetParent )( OBJECTCOOKIE * pcookieOut );
  57. STDMETHOD( GetStatus )( HRESULT * phrStatusOut );
  58. STDMETHOD( SetStatus )( HRESULT hrIn );
  59. }; //*** class CStandardInfo