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. wsbulong.h
  5. Abstract:
  6. This component is an object representations of the ULONG 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 _WSBULONG_
  15. #define _WSBULONG_
  16. /*++
  17. Class Name:
  18. CWsbUlong
  19. Class Description:
  20. An object representations of the ULONG standard type. It
  21. is both persistable and collectable.
  22. --*/
  23. class CWsbUlong :
  24. public CWsbObject,
  25. public IWsbUlong,
  26. public CComCoClass<CWsbUlong,&CLSID_CWsbUlong>
  27. {
  28. public:
  29. CWsbUlong() {}
  30. BEGIN_COM_MAP(CWsbUlong)
  31. COM_INTERFACE_ENTRY2(IPersist, IPersistStream)
  32. COM_INTERFACE_ENTRY(IPersistStream)
  33. COM_INTERFACE_ENTRY(IWsbUlong)
  34. COM_INTERFACE_ENTRY2(IWsbCollectable, IWsbUlong)
  35. COM_INTERFACE_ENTRY(IWsbPersistStream)
  36. COM_INTERFACE_ENTRY(IWsbTestable)
  37. END_COM_MAP()
  38. DECLARE_REGISTRY_RESOURCEID(IDR_CWsbUlong)
  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. // IWsbUlong
  55. public:
  56. STDMETHOD(CompareToUlong)(ULONG value, SHORT* pResult);
  57. STDMETHOD(CompareToIUlong)(IWsbUlong* pUlong, SHORT* pResult);
  58. STDMETHOD(GetUlong)(ULONG* pValue);
  59. STDMETHOD(SetUlong)(ULONG value);
  60. // IWsbTestable
  61. public:
  62. STDMETHOD(Test)(USHORT *passed, USHORT *failed);
  63. protected:
  64. ULONG m_value;
  65. };
  66. #endif // _WSBULONG_