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.

115 lines
3.3 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1994
  5. //
  6. // File: nullfilt.hxx
  7. //
  8. // Contents: CNullIFilter and CNullIFilterCF
  9. //
  10. // History: 23-Aug-1994 t-jeffc Created
  11. //
  12. //--------------------------------------------------------------------------
  13. #pragma once
  14. //+-------------------------------------------------------------------------
  15. //
  16. // Class: CNullIFilter
  17. //
  18. // Purpose:
  19. //
  20. // History:
  21. //
  22. //--------------------------------------------------------------------------
  23. extern "C" GUID CLSID_CNullIFilter;
  24. class CNullIFilter : public IFilter, public IPersistFile
  25. {
  26. public:
  27. CNullIFilter();
  28. //
  29. // From IUnknown
  30. //
  31. virtual SCODE STDMETHODCALLTYPE QueryInterface(REFIID riid, void * * ppvObject);
  32. virtual ULONG STDMETHODCALLTYPE AddRef();
  33. virtual ULONG STDMETHODCALLTYPE Release();
  34. //
  35. // From IFilter
  36. //
  37. virtual SCODE STDMETHODCALLTYPE Init( ULONG grfFlags,
  38. ULONG cAttributes,
  39. FULLPROPSPEC const * aAttributes,
  40. ULONG * pFlags );
  41. virtual SCODE STDMETHODCALLTYPE GetChunk( STAT_CHUNK * pStat);
  42. virtual SCODE STDMETHODCALLTYPE GetText( ULONG * pcwcBuffer,
  43. WCHAR * awcBuffer );
  44. virtual SCODE STDMETHODCALLTYPE GetValue( PROPVARIANT * * ppPropValue );
  45. virtual SCODE STDMETHODCALLTYPE BindRegion( FILTERREGION origPos,
  46. REFIID riid,
  47. void ** ppunk );
  48. //
  49. // From IPersistFile
  50. //
  51. virtual SCODE STDMETHODCALLTYPE GetClassID( CLSID * pClassID );
  52. virtual SCODE STDMETHODCALLTYPE IsDirty();
  53. virtual SCODE STDMETHODCALLTYPE Load( LPCWSTR pszFileName,
  54. DWORD dwMode);
  55. virtual SCODE STDMETHODCALLTYPE Save( LPCWSTR pszFileName,
  56. BOOL fRemember );
  57. virtual SCODE STDMETHODCALLTYPE SaveCompleted( LPCWSTR pszFileName );
  58. virtual SCODE STDMETHODCALLTYPE GetCurFile( LPWSTR * ppszFileName );
  59. private:
  60. ~CNullIFilter();
  61. long _cRefs;
  62. WCHAR * _pwszFileName;
  63. };
  64. //+-------------------------------------------------------------------------
  65. //
  66. // Class: CNullIFilterCF
  67. //
  68. // Purpose:
  69. //
  70. // History:
  71. //
  72. //--------------------------------------------------------------------------
  73. class CNullIFilterCF : public IClassFactory
  74. {
  75. public:
  76. CNullIFilterCF();
  77. //
  78. // From IUnknown
  79. //
  80. virtual SCODE STDMETHODCALLTYPE QueryInterface( REFIID riid,
  81. void ** ppvObject);
  82. virtual ULONG STDMETHODCALLTYPE AddRef();
  83. virtual ULONG STDMETHODCALLTYPE Release();
  84. //
  85. // From IClassFactory
  86. //
  87. virtual SCODE STDMETHODCALLTYPE CreateInstance( IUnknown * pUnkOuter,
  88. REFIID riid, void * * ppvObject );
  89. virtual SCODE STDMETHODCALLTYPE LockServer( BOOL fLock );
  90. protected:
  91. ~CNullIFilterCF();
  92. long _cRefs;
  93. };