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.

138 lines
4.0 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: GenIFilterBase
  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 GenIFilterBase : public IFilter, public IPersistFile
  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( VARIANT * * 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. protected:
  68. friend class CTextIFilterCF;
  69. GenIFilterBase();
  70. virtual ~GenIFilterBase();
  71. long _uRefs;
  72. };
  73. //+-------------------------------------------------------------------------
  74. //
  75. // Class: CTextIFilterCF
  76. //
  77. // Purpose: Class factory for text filter class
  78. //
  79. // History: 23-Feb-94 KyleP Created
  80. //
  81. //--------------------------------------------------------------------------
  82. class GenIFilterCF : public IClassFactory
  83. {
  84. public:
  85. GenIFilterCF();
  86. virtual SCODE STDMETHODCALLTYPE QueryInterface( REFIID riid,
  87. void ** ppvObject);
  88. virtual ULONG STDMETHODCALLTYPE AddRef();
  89. virtual ULONG STDMETHODCALLTYPE Release();
  90. virtual SCODE STDMETHODCALLTYPE CreateInstance( IUnknown * pUnkOuter,
  91. REFIID riid, void * * ppvObject );
  92. virtual SCODE STDMETHODCALLTYPE LockServer( BOOL fLock );
  93. protected:
  94. friend SCODE STDMETHODCALLTYPE DllGetClassObject( REFCLSID cid,
  95. REFIID iid, void** ppvObj );
  96. virtual ~GenIFilterCF();
  97. long _uRefs;
  98. };