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.

94 lines
1.9 KiB

  1. /*++
  2. 1998 Seagate Software, Inc. All rights reserved
  3. Module Name:
  4. wsbguid.h
  5. Abstract:
  6. This component is an object representations of the GUID standard type. It
  7. is both a persistable and collectable.
  8. Author:
  9. Chuck Bardeen [cbardeen] 29-Oct-1996
  10. Revision History:
  11. --*/
  12. #include "resource.h"
  13. #include "wsbcltbl.h"
  14. #ifndef _WSBGUID_
  15. #define _WSBGUID_
  16. /*++
  17. Class Name:
  18. CWsbGuid
  19. Class Description:
  20. An object representations of the GUID standard type. It
  21. is both persistable and collectable.
  22. --*/
  23. class CWsbGuid :
  24. public CWsbObject,
  25. public IWsbGuid,
  26. public CComCoClass<CWsbGuid,&CLSID_CWsbGuid>
  27. {
  28. public:
  29. CWsbGuid() {}
  30. BEGIN_COM_MAP(CWsbGuid)
  31. COM_INTERFACE_ENTRY2(IPersist, IPersistStream)
  32. COM_INTERFACE_ENTRY(IPersistStream)
  33. COM_INTERFACE_ENTRY(IWsbGuid)
  34. COM_INTERFACE_ENTRY2(IWsbCollectable, IWsbGuid)
  35. COM_INTERFACE_ENTRY(IWsbPersistStream)
  36. COM_INTERFACE_ENTRY(IWsbTestable)
  37. END_COM_MAP()
  38. DECLARE_REGISTRY_RESOURCEID(IDR_CWsbGuid)
  39. // CComObjectRoot
  40. public:
  41. STDMETHOD(FinalConstruct)(void);
  42. // IPersist
  43. public:
  44. STDMETHOD(GetClassID)(LPCLSID pClsid);
  45. // IPersistStream
  46. public:
  47. STDMETHOD(GetSizeMax)(ULARGE_INTEGER* pSize);
  48. STDMETHOD(Load)(IStream* pStream);
  49. STDMETHOD(Save)(IStream* pStream, BOOL clearDirty);
  50. // IWsbCollectable
  51. public:
  52. STDMETHOD(CompareTo)(IUnknown* pCollectable, SHORT* pResult);
  53. WSB_FROM_CWSBOBJECT;
  54. // IWsbGuid
  55. public:
  56. STDMETHOD(CompareToGuid)(GUID value, SHORT* pResult);
  57. STDMETHOD(CompareToIGuid)(IWsbGuid* pGuid, SHORT* pResult);
  58. STDMETHOD(GetGuid)(GUID* pValue);
  59. STDMETHOD(SetGuid)(GUID value);
  60. // IWsbTestable
  61. public:
  62. STDMETHOD(Test)(USHORT *passed, USHORT *failed);
  63. protected:
  64. GUID m_value;
  65. };
  66. #endif // _WSBGUID_