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.

111 lines
2.9 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999-2000 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // ProvBase.h
  7. //
  8. // Implementation File:
  9. // ProvBase.cpp
  10. //
  11. // Description:
  12. // Definition of the CProvBase class.
  13. //
  14. // Author:
  15. // Henry Wang (HenryWa) 24-AUG-1999
  16. // MSP Prabu (mprabu) 06-Jan-2001
  17. //
  18. // Notes:
  19. //
  20. //////////////////////////////////////////////////////////////////////////////
  21. #pragma once
  22. //////////////////////////////////////////////////////////////////////////////
  23. // Include Files
  24. //////////////////////////////////////////////////////////////////////////////
  25. //////////////////////////////////////////////////////////////////////////////
  26. // Forward Declarations
  27. //////////////////////////////////////////////////////////////////////////////
  28. class CProvBase;
  29. //////////////////////////////////////////////////////////////////////////////
  30. // External Declarations
  31. //////////////////////////////////////////////////////////////////////////////
  32. /* main interface class, this class defines all operations can be performed
  33. on this provider
  34. */
  35. //class CSqlEval;
  36. //////////////////////////////////////////////////////////////////////////////
  37. //++
  38. //
  39. // class CProvBase
  40. //
  41. // Description:
  42. // interface class defines all operations can be performed
  43. //
  44. //--
  45. //////////////////////////////////////////////////////////////////////////////
  46. class CProvBase
  47. {
  48. public:
  49. virtual HRESULT EnumInstance(
  50. long lFlagsIn,
  51. IWbemContext * pCtxIn,
  52. IWbemObjectSink * pHandlerIn
  53. ) = 0;
  54. virtual HRESULT GetObject(
  55. CObjPath & rObjPathIn,
  56. long lFlagsIn,
  57. IWbemContext * pCtxIn,
  58. IWbemObjectSink * pHandlerIn
  59. ) = 0;
  60. virtual HRESULT ExecuteMethod(
  61. BSTR bstrObjPathIn,
  62. WCHAR * pwszMethodNameIn,
  63. long lFlagIn,
  64. IWbemClassObject * pParamsIn,
  65. IWbemObjectSink * pHandlerIn
  66. ) = 0;
  67. virtual HRESULT PutInstance(
  68. CWbemClassObject & rInstToPutIn,
  69. long lFlagIn,
  70. IWbemContext * pCtxIn,
  71. IWbemObjectSink * pHandlerIn
  72. ) = 0;
  73. virtual HRESULT DeleteInstance(
  74. CObjPath & rObjPathIn,
  75. long lFlagIn,
  76. IWbemContext * pCtxIn,
  77. IWbemObjectSink * pHandlerIn
  78. ) = 0;
  79. CProvBase(
  80. LPCWSTR pwszNameIn,
  81. CWbemServices * pNamespaceIn
  82. );
  83. virtual ~CProvBase()
  84. {
  85. if ( m_pClass != NULL )
  86. {
  87. m_pClass->Release();
  88. }
  89. }
  90. protected:
  91. CWbemServices * m_pNamespace;
  92. IWbemClassObject * m_pClass;
  93. _bstr_t m_bstrClassName;
  94. }; //*** class CProvBase