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. wsbllong.h
  5. Abstract:
  6. This component is an object representations of the LONGLONG standard type. It
  7. is both a persistable and collectable.
  8. Author:
  9. Ron White [ronw] 21-Jan-97
  10. Revision History:
  11. --*/
  12. #include "resource.h"
  13. #include "wsbcltbl.h"
  14. #ifndef _WSBLONGLONG_
  15. #define _WSBLONGLONG_
  16. /*++
  17. Class Name:
  18. CWsbLonglong
  19. Class Description:
  20. An object representations of the LONGLONG standard type. It
  21. is both persistable and collectable.
  22. --*/
  23. class CWsbLonglong :
  24. public CWsbObject,
  25. public IWsbLonglong,
  26. public CComCoClass<CWsbLonglong,&CLSID_CWsbLonglong>
  27. {
  28. public:
  29. CWsbLonglong() {}
  30. BEGIN_COM_MAP(CWsbLonglong)
  31. COM_INTERFACE_ENTRY(IWsbLonglong)
  32. COM_INTERFACE_ENTRY2(IWsbCollectable, IWsbLonglong)
  33. COM_INTERFACE_ENTRY2(IPersist, IPersistStream)
  34. COM_INTERFACE_ENTRY(IPersistStream)
  35. COM_INTERFACE_ENTRY(IWsbPersistStream)
  36. COM_INTERFACE_ENTRY(IWsbTestable)
  37. END_COM_MAP()
  38. DECLARE_REGISTRY_RESOURCEID(IDR_CWsbLonglong)
  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. // IWsbLonglong
  55. public:
  56. STDMETHOD(CompareToLonglong)(LONGLONG value, SHORT* pResult);
  57. STDMETHOD(CompareToILonglong)(IWsbLonglong* pValue, SHORT* pResult);
  58. STDMETHOD(GetLonglong)(LONGLONG* pValue);
  59. STDMETHOD(SetLonglong)(LONGLONG value);
  60. // IWsbTestable
  61. public:
  62. STDMETHOD(Test)(USHORT *passed, USHORT *failed);
  63. protected:
  64. LONGLONG m_value;
  65. };
  66. #endif // _WSBLONGLONG_