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.

103 lines
2.0 KiB

  1. /*++
  2. Copyright (c) 2001, Microsoft Corporation
  3. Module Name:
  4. reconvps.h
  5. Abstract:
  6. This file defines the CReconvertPropStore Interface Class.
  7. Author:
  8. Revision History:
  9. Notes:
  10. --*/
  11. #ifndef RECONVPS_H
  12. #define RECONVPS_H
  13. class CReconvertPropStore : public ITfPropertyStore
  14. {
  15. public:
  16. CReconvertPropStore(const GUID guid, VARTYPE vt, long lVal) : m_guid(guid)
  17. {
  18. QuickVariantInit(&m_var);
  19. m_var.vt = vt;
  20. m_var.lVal = lVal;
  21. m_ref = 1;
  22. }
  23. virtual ~CReconvertPropStore() { }
  24. bool Valid() { return true; }
  25. bool Invalid() { return ! Valid(); }
  26. //
  27. // IUnknown methods
  28. //
  29. public:
  30. STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj);
  31. STDMETHODIMP_(ULONG) AddRef(void);
  32. STDMETHODIMP_(ULONG) Release(void);
  33. //
  34. // ITfPropertyStore methods
  35. //
  36. STDMETHODIMP GetType(GUID *pguid);
  37. STDMETHODIMP GetDataType(DWORD *pdwReserved);
  38. STDMETHODIMP GetData(VARIANT *pvarValue);
  39. STDMETHODIMP OnTextUpdated(DWORD dwFlags, ITfRange *pRange, BOOL *pfAccept)
  40. {
  41. *pfAccept = FALSE;
  42. return S_OK;;
  43. }
  44. STDMETHODIMP Shrink(ITfRange *pRange, BOOL *pfFree)
  45. {
  46. *pfFree = TRUE;
  47. return S_OK;
  48. }
  49. STDMETHODIMP Divide(ITfRange *pRangeThis, ITfRange *pRangeNew, ITfPropertyStore **ppPropStore)
  50. {
  51. *ppPropStore = NULL;
  52. return S_OK;
  53. }
  54. //
  55. // ITfPropertyStore methods (not implementation)
  56. //
  57. STDMETHODIMP Clone(ITfPropertyStore **ppPropStore)
  58. {
  59. return E_NOTIMPL;
  60. }
  61. STDMETHODIMP GetPropertyRangeCreator(CLSID *pclsid)
  62. {
  63. return E_NOTIMPL;
  64. }
  65. STDMETHODIMP Serialize(IStream *pStream, ULONG *pcb)
  66. {
  67. return E_NOTIMPL;
  68. }
  69. //
  70. // ref count.
  71. //
  72. private:
  73. long m_ref;
  74. //
  75. // property GUID.
  76. //
  77. const GUID m_guid;
  78. //
  79. // property value.
  80. //
  81. VARIANT m_var;
  82. };
  83. #endif // RECONVPS_H