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.

96 lines
1.9 KiB

  1. /*++
  2. 1998 Seagate Software, Inc. All rights reserved
  3. Module Name:
  4. wsblong.h
  5. Abstract:
  6. This component is an object representations of the LONG 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 "wsb.h"
  14. #include "wsbcltbl.h"
  15. #ifndef _WSBLONG_
  16. #define _WSBLONG_
  17. /*++
  18. Class Name:
  19. CWsbLong
  20. Class Description:
  21. An object representations of the LONG standard type. It
  22. is both persistable and collectable.
  23. --*/
  24. class CWsbLong :
  25. public CWsbObject,
  26. public IWsbLong,
  27. public CComCoClass<CWsbLong,&CLSID_CWsbLong>
  28. {
  29. public:
  30. CWsbLong() {}
  31. BEGIN_COM_MAP(CWsbLong)
  32. COM_INTERFACE_ENTRY2(IPersist, IPersistStream)
  33. COM_INTERFACE_ENTRY(IPersistStream)
  34. COM_INTERFACE_ENTRY(IWsbLong)
  35. COM_INTERFACE_ENTRY2(IWsbCollectable, IWsbLong)
  36. COM_INTERFACE_ENTRY(IWsbPersistStream)
  37. COM_INTERFACE_ENTRY(IWsbTestable)
  38. END_COM_MAP()
  39. DECLARE_REGISTRY_RESOURCEID(IDR_CWsbLong)
  40. // CComObjectRoot
  41. public:
  42. STDMETHOD(FinalConstruct)(void);
  43. // IPersist
  44. public:
  45. STDMETHOD(GetClassID)(LPCLSID pClsid);
  46. // IPersistStream
  47. public:
  48. STDMETHOD(GetSizeMax)(ULARGE_INTEGER* pSize);
  49. STDMETHOD(Load)(IStream* pStream);
  50. STDMETHOD(Save)(IStream* pStream, BOOL clearDirty);
  51. // IWsbCollectable
  52. public:
  53. STDMETHOD(CompareTo)(IUnknown* pCollectable, SHORT* pResult);
  54. WSB_FROM_CWSBOBJECT;
  55. // IWsbLong
  56. public:
  57. STDMETHOD(CompareToLong)(LONG value, SHORT* pResult);
  58. STDMETHOD(CompareToILong)(IWsbLong* pLong, SHORT* pResult);
  59. STDMETHOD(GetLong)(LONG* pValue);
  60. STDMETHOD(SetLong)(LONG value);
  61. // IWsbTestable
  62. public:
  63. STDMETHOD(Test)(USHORT *passed, USHORT *failed);
  64. protected:
  65. LONG m_value;
  66. };
  67. #endif // _WSBLONG_