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.

100 lines
2.2 KiB

  1. /*++
  2. 1998 Seagate Software, Inc. All rights reserved.
  3. Module Name:
  4. wsbstrg.h
  5. Abstract:
  6. This component is an object representations of the STRING 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. #include "wsbpstrg.h"
  15. #ifndef _WSBSTRG_
  16. #define _WSBSTRG_
  17. /*++
  18. Class Name:
  19. CWsbString
  20. Class Description:
  21. An object representations of the STRING standard type. It
  22. is both persistable and collectable.
  23. --*/
  24. class CWsbString :
  25. public CWsbObject,
  26. public IWsbString,
  27. public CComCoClass<CWsbString,&CLSID_CWsbString>
  28. {
  29. public:
  30. CWsbString() {}
  31. BEGIN_COM_MAP(CWsbString)
  32. COM_INTERFACE_ENTRY2(IPersist, IPersistStream)
  33. COM_INTERFACE_ENTRY(IPersistStream)
  34. COM_INTERFACE_ENTRY(IWsbString)
  35. COM_INTERFACE_ENTRY2(IWsbCollectable, IWsbString)
  36. COM_INTERFACE_ENTRY(IWsbPersistStream)
  37. COM_INTERFACE_ENTRY(IWsbTestable)
  38. END_COM_MAP()
  39. DECLARE_REGISTRY_RESOURCEID(IDR_CWsbString)
  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. // IWsbString
  56. public:
  57. STDMETHOD(CompareToString)(OLECHAR* value, SHORT* pResult);
  58. STDMETHOD(CompareToIString)(IWsbString* pString, SHORT* pResult);
  59. STDMETHOD(GetString)(OLECHAR** pValue, ULONG bufferSize);
  60. STDMETHOD(GetStringAndCase)(OLECHAR** pValue, BOOL* pIsCaseDependent, ULONG bufferSize);
  61. STDMETHOD(IsCaseDependent)(void);
  62. STDMETHOD(SetIsCaseDependent)(BOOL isCaseDependent);
  63. STDMETHOD(SetString)(OLECHAR* value);
  64. STDMETHOD(SetStringAndCase)(OLECHAR* value, BOOL isCaseDependent);
  65. // IWsbTestable
  66. public:
  67. STDMETHOD(Test)(USHORT *passed, USHORT *failed);
  68. protected:
  69. CWsbStringPtr m_value;
  70. BOOL m_isCaseDependent;
  71. };
  72. #endif // _WSBSTRG_