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.

82 lines
2.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1996 - 2000.
  5. //
  6. // Microsoft Windows
  7. // Copyright (C) Microsoft Corporation, 1996 - 1999.
  8. //
  9. // File: CiOle.hxx
  10. //
  11. // Contents: Switch between OLE and 'Short' OLE
  12. //
  13. // Classes: CCiOle
  14. //
  15. // History: 01-Feb-96 KyleP Added header
  16. // 31-Jan-96 KyleP Added support for embeddings
  17. //
  18. //----------------------------------------------------------------------------
  19. #pragma once
  20. #include <shtole.hxx>
  21. //+---------------------------------------------------------------------------
  22. //
  23. // Class: CCiOle
  24. //
  25. // Purpose: Wrapper to select between OLE and 'Short-OLE'
  26. //
  27. // History: 01-Feb-96 KyleP Added header
  28. // 31-Jan-96 KyleP Added support for embeddings
  29. // 18-Dec-97 KLam Added ability to flush idle filters
  30. //
  31. // Notes: This class is mostly for future switching between OLE and
  32. // short OLE. Right now (2/96) only short OLE works.
  33. //
  34. //----------------------------------------------------------------------------
  35. class CCiOle
  36. {
  37. public:
  38. CCiOle();
  39. ~CCiOle();
  40. static void SetUseOle( BOOL fUseOle ) { _fUseOle = fUseOle; }
  41. static BOOL UsingOle() { return _fUseOle; }
  42. static SCODE BindIFilter( WCHAR const * pwcPath,
  43. IUnknown * pUnkOuter,
  44. IFilter ** ppFilter,
  45. BOOL fFreeThreadedOnly = FALSE );
  46. static SCODE BindIFilter( WCHAR const * pwcPath,
  47. IUnknown * pUnkOuter, GUID const & classid,
  48. IFilter ** ppFilter,
  49. BOOL fFreeThreadedOnly = FALSE );
  50. static SCODE BindIFilter( IStorage * pStg,
  51. IUnknown * pUnkOuter,
  52. IFilter ** ppFilter,
  53. BOOL fFreeThreadedOnly = FALSE );
  54. static SCODE BindIFilter( IStream * pStm,
  55. IUnknown * pUnkOuter,
  56. IFilter ** ppFilter,
  57. BOOL fFreeThreadedOnly = FALSE );
  58. static IWordBreaker * NewWordBreaker( GUID const & classid );
  59. static IStemmer * NewStemmer( GUID const & classid );
  60. static void Init();
  61. static void Shutdown();
  62. static void FlushIdle();
  63. private:
  64. static BOOL _fUseOle;
  65. static long _cInitialized;
  66. static CShtOle _shtOle;
  67. };