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.

136 lines
2.4 KiB

  1. #ifndef _Server_Interceptor_IWbemProviderInitSink_H
  2. #define _Server_Interceptor_IWbemProviderInitSink_H
  3. /*++
  4. Copyright (C) 1996-2001 Microsoft Corporation
  5. Module Name:
  6. ProvObSk.H
  7. Abstract:
  8. History:
  9. --*/
  10. /******************************************************************************
  11. *
  12. * Name:
  13. *
  14. *
  15. * Description:
  16. *
  17. *
  18. *****************************************************************************/
  19. class CServerObject_ProviderInitSink : public IWbemProviderInitSink
  20. {
  21. private:
  22. LONG m_ReferenceCount ;
  23. BOOL m_StatusCalled ;
  24. HANDLE m_Event ;
  25. HRESULT m_Result ;
  26. SECURITY_DESCRIPTOR *m_SecurityDescriptor ;
  27. protected:
  28. public:
  29. CServerObject_ProviderInitSink ( SECURITY_DESCRIPTOR *a_SecurityDescriptor =
  30. NULL ) ;
  31. virtual ~CServerObject_ProviderInitSink () ;
  32. HRESULT SinkInitialize ( SECURITY_DESCRIPTOR *a_SecurityDescriptor = NULL ) ;
  33. STDMETHODIMP QueryInterface (
  34. REFIID iid ,
  35. LPVOID FAR *iplpv
  36. ) ;
  37. STDMETHODIMP_( ULONG ) AddRef () ;
  38. STDMETHODIMP_(ULONG) Release () ;
  39. HRESULT STDMETHODCALLTYPE SetStatus (
  40. LONG a_Status,
  41. LONG a_Flags
  42. ) ;
  43. void Wait ( DWORD a_Timeout = 300000 )
  44. {
  45. if ( WaitForSingleObject ( m_Event , a_Timeout ) == WAIT_TIMEOUT )
  46. {
  47. m_Result = WBEM_E_PROVIDER_LOAD_FAILURE ;
  48. }
  49. }
  50. void Reset ()
  51. {
  52. ResetEvent ( m_Event ) ;
  53. m_Result = S_OK ;
  54. }
  55. HRESULT GetResult () { return m_Result ; }
  56. } ;
  57. /******************************************************************************
  58. *
  59. * Name:
  60. *
  61. *
  62. * Description:
  63. *
  64. *
  65. *****************************************************************************/
  66. class CInterceptor_IWbemProviderInitSink : public IWbemProviderInitSink
  67. {
  68. private:
  69. LONG m_ReferenceCount ;
  70. LONG m_GateClosed ;
  71. LONG m_InProgress ;
  72. BOOL m_StatusCalled ;
  73. IWbemProviderInitSink *m_InterceptedSink ;
  74. protected:
  75. public:
  76. CInterceptor_IWbemProviderInitSink (
  77. IWbemProviderInitSink *a_InterceptedSink
  78. ) ;
  79. ~CInterceptor_IWbemProviderInitSink () ;
  80. //Non-delegating object IUnknown
  81. STDMETHODIMP QueryInterface ( REFIID , LPVOID FAR * ) ;
  82. STDMETHODIMP_( ULONG ) AddRef () ;
  83. STDMETHODIMP_( ULONG ) Release () ;
  84. HRESULT STDMETHODCALLTYPE SetStatus (
  85. LONG a_Status,
  86. LONG a_Flags
  87. ) ;
  88. HRESULT STDMETHODCALLTYPE Shutdown () ;
  89. } ;
  90. #endif _Server_Interceptor_IWbemProviderInitSink_H