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.

114 lines
2.4 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1998.
  5. //
  6. // File: isrchcf.hxx
  7. //
  8. // Contents: Class Factory for the CLSID_ISearchCreator object
  9. //
  10. // History: 2-26-97 srikants Created
  11. //
  12. //----------------------------------------------------------------------------
  13. #pragma once
  14. #include <ciintf.h>
  15. extern const GUID clsidISearchCreator;
  16. //+---------------------------------------------------------------------------
  17. //
  18. // Class: CCiISearchCreator
  19. //
  20. // Purpose: CiISearchCreator object
  21. //
  22. // History: 2-26-97 srikants Created
  23. //
  24. //----------------------------------------------------------------------------
  25. class CCiISearchCreator : public ICiISearchCreator
  26. {
  27. public:
  28. CCiISearchCreator() : _refCount(1)
  29. {
  30. }
  31. //
  32. // IUnknown methods.
  33. //
  34. STDMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID *ppiuk );
  35. STDMETHOD_(ULONG, AddRef) (THIS);
  36. STDMETHOD_(ULONG, Release) (THIS);
  37. STDMETHOD(CreateISearch) (
  38. DBCOMMANDTREE * pRst,
  39. ICiCLangRes * pILangRes,
  40. ICiCOpenedDoc * pIOpenedDoc,
  41. ISearchQueryHits ** ppISearch );
  42. private:
  43. long _refCount;
  44. };
  45. //+---------------------------------------------------------------------------
  46. //
  47. // Class: CCiISearchCreatorCF
  48. //
  49. // Purpose: Class Factory for the ICiSearchCreator object
  50. //
  51. // History: 2-26-97 srikants Created
  52. //
  53. //----------------------------------------------------------------------------
  54. class CCiISearchCreatorCF : public IClassFactory
  55. {
  56. public:
  57. //
  58. // IUnknown methods.
  59. //
  60. STDMETHOD( QueryInterface ) ( THIS_ REFIID riid,LPVOID *ppiuk );
  61. STDMETHOD_( ULONG, AddRef ) ( THIS );
  62. STDMETHOD_( ULONG, Release ) ( THIS );
  63. //
  64. // IClassFactory methods.
  65. //
  66. STDMETHOD( CreateInstance ) ( THIS_
  67. IUnknown * pUnkOuter,
  68. REFIID riid,
  69. void * * ppvObject );
  70. STDMETHOD( LockServer ) ( THIS_ BOOL fLock );
  71. CCiISearchCreatorCF( void );
  72. protected:
  73. //
  74. // Hidden destructor so that only we can delete the instance
  75. // based on IUnknown control
  76. //
  77. virtual ~CCiISearchCreatorCF();
  78. private:
  79. //
  80. // IUnknown reference count.
  81. //
  82. LONG _RefCount;
  83. };