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.

125 lines
2.5 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. ProvResv.h
  5. Abstract:
  6. History:
  7. --*/
  8. #ifndef _Server_DynamicPropertyProviderResolver_H
  9. #define _Server_DynamicPropertyProviderResolver_H
  10. /******************************************************************************
  11. *
  12. * Name:
  13. *
  14. *
  15. * Description:
  16. *
  17. *
  18. *****************************************************************************/
  19. class CServerObject_DynamicPropertyProviderResolver : public _IWmiDynamicPropertyResolver ,
  20. public IWbemProviderInit ,
  21. public IWbemShutdown
  22. {
  23. private:
  24. long m_ReferenceCount ;
  25. WmiAllocator &m_Allocator ;
  26. _IWmiProviderFactory *m_Factory ;
  27. IWbemServices *m_CoreStub ;
  28. BSTR m_User ;
  29. BSTR m_Locale ;
  30. HRESULT GetClassAndInstanceContext (
  31. IWbemClassObject *a_Class ,
  32. IWbemClassObject *a_Instance ,
  33. BSTR &a_ClassContext ,
  34. BSTR &a_InstanceContext ,
  35. BOOL &a_Dynamic
  36. ) ;
  37. HRESULT ReadOrWrite (
  38. IWbemContext *a_Context ,
  39. IWbemClassObject *a_Instance ,
  40. BSTR a_ClassContext ,
  41. BSTR a_InstanceContext ,
  42. BSTR a_PropertyContext ,
  43. BSTR a_Provider ,
  44. BSTR a_Property ,
  45. BOOL a_Read
  46. ) ;
  47. HRESULT STDMETHODCALLTYPE ReadOrWrite (
  48. IWbemContext *a_Context ,
  49. IWbemClassObject *a_Class ,
  50. IWbemClassObject *a_Instance ,
  51. BOOL a_Read
  52. ) ;
  53. protected:
  54. public:
  55. CServerObject_DynamicPropertyProviderResolver (
  56. WmiAllocator &a_Allocator ,
  57. _IWmiProviderFactory *a_Factory ,
  58. IWbemServices *a_CoreStub
  59. ) ;
  60. ~CServerObject_DynamicPropertyProviderResolver () ;
  61. //IUnknown members
  62. STDMETHODIMP QueryInterface ( REFIID , LPVOID FAR * ) ;
  63. STDMETHODIMP_( ULONG ) AddRef () ;
  64. STDMETHODIMP_( ULONG ) Release () ;
  65. // IWmi_DynamicPropertyResolver members
  66. HRESULT STDMETHODCALLTYPE Read (
  67. IWbemContext *a_Context ,
  68. IWbemClassObject *a_Class ,
  69. IWbemClassObject **a_Instance
  70. );
  71. HRESULT STDMETHODCALLTYPE Write (
  72. IWbemContext *a_Context ,
  73. IWbemClassObject *a_Class ,
  74. IWbemClassObject *a_Instance
  75. ) ;
  76. HRESULT STDMETHODCALLTYPE Initialize (
  77. LPWSTR a_User ,
  78. LONG a_Flags ,
  79. LPWSTR a_Namespace ,
  80. LPWSTR a_Locale ,
  81. IWbemServices *a_Core ,
  82. IWbemContext *a_Context ,
  83. IWbemProviderInitSink *a_Sink
  84. ) ;
  85. HRESULT STDMETHODCALLTYPE Shutdown (
  86. LONG a_Flags ,
  87. ULONG a_MaxMilliSeconds ,
  88. IWbemContext *a_Context
  89. ) ;
  90. };
  91. #endif // #define _Server_DynamicPropertyProviderResolver_H