Source code of Windows XP (NT5)
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.

156 lines
4.3 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1994
  5. //
  6. // File: txtifilt.hxx
  7. //
  8. // Contents: Text filter 'class factory'.
  9. //
  10. // History: 23-Feb-1994 KyleP Created
  11. //
  12. // Notes: Machine generated. Hand modified.
  13. //
  14. //--------------------------------------------------------------------------
  15. #pragma once
  16. //
  17. // Standard Ole exports
  18. //
  19. extern "C" SCODE STDMETHODCALLTYPE DllGetClassObject( REFCLSID cid,
  20. REFIID iid,
  21. void ** ppvObj );
  22. extern "C" SCODE STDMETHODCALLTYPE DllCanUnloadNow( void );
  23. //+-------------------------------------------------------------------------
  24. //
  25. // Class: CTextIFilterBase
  26. //
  27. // Purpose: Manage aggregation, refcounting for CTextIFilter
  28. //
  29. // History: 23-Feb-94 KyleP Created
  30. //
  31. //--------------------------------------------------------------------------
  32. extern "C" GUID CLSID_CTextIFilter;
  33. class CTextIFilterBase : public IFilter, public IPersistFile, public IPersistStream
  34. {
  35. public:
  36. //
  37. // From IUnknown
  38. //
  39. virtual SCODE STDMETHODCALLTYPE QueryInterface(REFIID riid, void * * ppvObject);
  40. virtual ULONG STDMETHODCALLTYPE AddRef();
  41. virtual ULONG STDMETHODCALLTYPE Release();
  42. //
  43. // From IFilter
  44. //
  45. virtual SCODE STDMETHODCALLTYPE Init( ULONG grfFlags,
  46. ULONG cAttributes,
  47. FULLPROPSPEC const * aAttributes,
  48. ULONG * pFlags ) = 0;
  49. virtual SCODE STDMETHODCALLTYPE GetChunk( STAT_CHUNK * pStat) = 0;
  50. virtual SCODE STDMETHODCALLTYPE GetText( ULONG * pcwcBuffer,
  51. WCHAR * awcBuffer ) = 0;
  52. virtual SCODE STDMETHODCALLTYPE GetValue( PROPVARIANT * * ppPropValue ) = 0;
  53. virtual SCODE STDMETHODCALLTYPE BindRegion( FILTERREGION origPos,
  54. REFIID riid,
  55. void ** ppunk) = 0;
  56. //
  57. // From IPersistFile
  58. //
  59. virtual SCODE STDMETHODCALLTYPE GetClassID( CLSID * pClassID ) = 0;
  60. virtual SCODE STDMETHODCALLTYPE IsDirty() = 0;
  61. virtual SCODE STDMETHODCALLTYPE Load( LPCWSTR pszFileName,
  62. DWORD dwMode) = 0;
  63. virtual SCODE STDMETHODCALLTYPE Save( LPCWSTR pszFileName,
  64. BOOL fRemember ) = 0;
  65. virtual SCODE STDMETHODCALLTYPE SaveCompleted( LPCWSTR pszFileName ) = 0;
  66. virtual SCODE STDMETHODCALLTYPE GetCurFile( LPWSTR * ppszFileName ) = 0;
  67. //
  68. // From IPersistStream
  69. //
  70. virtual SCODE STDMETHODCALLTYPE Load( IStream * pStm ) = 0;
  71. virtual SCODE STDMETHODCALLTYPE Save( IStream * pStm, BOOL fClearDirty ) = 0;
  72. virtual SCODE STDMETHODCALLTYPE GetSizeMax( ULARGE_INTEGER * pcbSize ) = 0;
  73. protected:
  74. friend class CTextIFilterCF;
  75. CTextIFilterBase();
  76. virtual ~CTextIFilterBase();
  77. long _cRefs;
  78. };
  79. //+-------------------------------------------------------------------------
  80. //
  81. // Class: CTextIFilterCF
  82. //
  83. // Purpose: Class factory for text filter class
  84. //
  85. // History: 23-Feb-94 KyleP Created
  86. //
  87. //--------------------------------------------------------------------------
  88. class CTextIFilterCF : public IClassFactory
  89. {
  90. public:
  91. CTextIFilterCF();
  92. //
  93. // From IUnknown
  94. //
  95. virtual SCODE STDMETHODCALLTYPE QueryInterface( REFIID riid,
  96. void ** ppvObject);
  97. virtual ULONG STDMETHODCALLTYPE AddRef();
  98. virtual ULONG STDMETHODCALLTYPE Release();
  99. //
  100. // From IClassFactory
  101. //
  102. virtual SCODE STDMETHODCALLTYPE CreateInstance( IUnknown * pUnkOuter,
  103. REFIID riid, void * * ppvObject );
  104. virtual SCODE STDMETHODCALLTYPE LockServer( BOOL fLock );
  105. protected:
  106. friend SCODE STDMETHODCALLTYPE DllGetClassObject( REFCLSID cid,
  107. REFIID iid, void** ppvObj );
  108. virtual ~CTextIFilterCF();
  109. long _cRefs;
  110. };