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.

148 lines
4.1 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: CxxIFilterBase
  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 CxxIFilterBase : public IFilter, public IPersistFile, public IPersistStream
  34. {
  35. public:
  36. //
  37. // From IUnknown
  38. //
  39. SCODE STDMETHODCALLTYPE QueryInterface(REFIID riid, void * * ppvObject);
  40. ULONG STDMETHODCALLTYPE AddRef();
  41. ULONG STDMETHODCALLTYPE Release();
  42. //
  43. // From IFilter
  44. //
  45. SCODE STDMETHODCALLTYPE Init( ULONG grfFlags,
  46. ULONG cAttributes,
  47. FULLPROPSPEC const * aAttributes,
  48. ULONG * pFlags ) = 0;
  49. SCODE STDMETHODCALLTYPE GetChunk( STAT_CHUNK * pStat) = 0;
  50. SCODE STDMETHODCALLTYPE GetText( ULONG * pcwcBuffer,
  51. WCHAR * awcBuffer ) = 0;
  52. SCODE STDMETHODCALLTYPE GetValue( PROPVARIANT * * ppPropValue ) = 0;
  53. SCODE STDMETHODCALLTYPE BindRegion( FILTERREGION origPos,
  54. REFIID riid,
  55. void ** ppunk) = 0;
  56. //
  57. // From IPersistFile
  58. //
  59. SCODE STDMETHODCALLTYPE GetClassID( CLSID * pClassID ) = 0;
  60. SCODE STDMETHODCALLTYPE IsDirty() = 0;
  61. SCODE STDMETHODCALLTYPE Load( LPCWSTR pszFileName,
  62. DWORD dwMode) = 0;
  63. SCODE STDMETHODCALLTYPE Save( LPCWSTR pszFileName,
  64. BOOL fRemember ) = 0;
  65. SCODE STDMETHODCALLTYPE SaveCompleted( LPCWSTR pszFileName ) = 0;
  66. SCODE STDMETHODCALLTYPE GetCurFile( LPWSTR * ppszFileName ) = 0;
  67. //
  68. // From IPersistStream
  69. //
  70. SCODE STDMETHODCALLTYPE Load( IStream * pStm ) = 0;
  71. SCODE STDMETHODCALLTYPE Save( IStream * pStm, BOOL fClearDirty ) = 0;
  72. SCODE STDMETHODCALLTYPE GetSizeMax( ULARGE_INTEGER * pcbSize ) = 0;
  73. protected:
  74. friend class CTextIFilterCF;
  75. CxxIFilterBase();
  76. virtual ~CxxIFilterBase();
  77. long _uRefs;
  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 CxxIFilterCF : public IClassFactory
  89. {
  90. public:
  91. CxxIFilterCF();
  92. virtual SCODE STDMETHODCALLTYPE QueryInterface( REFIID riid,
  93. void ** ppvObject);
  94. virtual ULONG STDMETHODCALLTYPE AddRef();
  95. virtual ULONG STDMETHODCALLTYPE Release();
  96. virtual SCODE STDMETHODCALLTYPE CreateInstance( IUnknown * pUnkOuter,
  97. REFIID riid, void * * ppvObject );
  98. virtual SCODE STDMETHODCALLTYPE LockServer( BOOL fLock );
  99. protected:
  100. friend SCODE STDMETHODCALLTYPE DllGetClassObject( REFCLSID cid,
  101. REFIID iid, void** ppvObj );
  102. virtual ~CxxIFilterCF();
  103. long _uRefs;
  104. };