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.

134 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 = NULL ) ;
  30. virtual ~CServerObject_ProviderInitSink () ;
  31. HRESULT SinkInitialize ( SECURITY_DESCRIPTOR *a_SecurityDescriptor = NULL ) ;
  32. STDMETHODIMP QueryInterface (
  33. REFIID iid ,
  34. LPVOID FAR *iplpv
  35. ) ;
  36. STDMETHODIMP_( ULONG ) AddRef () ;
  37. STDMETHODIMP_(ULONG) Release () ;
  38. HRESULT STDMETHODCALLTYPE SetStatus (
  39. LONG a_Status,
  40. LONG a_Flags
  41. ) ;
  42. void Wait ( DWORD a_Timeout = 300000 )
  43. {
  44. if ( WaitForSingleObject ( m_Event , a_Timeout ) == WAIT_TIMEOUT )
  45. {
  46. m_Result = WBEM_E_PROVIDER_LOAD_FAILURE ;
  47. }
  48. }
  49. void Reset ()
  50. {
  51. ResetEvent ( m_Event ) ;
  52. m_Result = S_OK ;
  53. }
  54. HRESULT GetResult () { return m_Result ; }
  55. } ;
  56. /******************************************************************************
  57. *
  58. * Name:
  59. *
  60. *
  61. * Description:
  62. *
  63. *
  64. *****************************************************************************/
  65. class CInterceptor_IWbemProviderInitSink : public IWbemProviderInitSink
  66. {
  67. private:
  68. LONG m_ReferenceCount ;
  69. LONG m_GateClosed ;
  70. LONG m_InProgress ;
  71. BOOL m_StatusCalled ;
  72. IWbemProviderInitSink *m_InterceptedSink ;
  73. protected:
  74. public:
  75. CInterceptor_IWbemProviderInitSink (
  76. IWbemProviderInitSink *a_InterceptedSink
  77. ) ;
  78. ~CInterceptor_IWbemProviderInitSink () ;
  79. //Non-delegating object IUnknown
  80. STDMETHODIMP QueryInterface ( REFIID , LPVOID FAR * ) ;
  81. STDMETHODIMP_( ULONG ) AddRef () ;
  82. STDMETHODIMP_( ULONG ) Release () ;
  83. HRESULT STDMETHODCALLTYPE SetStatus (
  84. LONG a_Status,
  85. LONG a_Flags
  86. ) ;
  87. HRESULT STDMETHODCALLTYPE Shutdown () ;
  88. } ;
  89. #endif _Server_Interceptor_IWbemProviderInitSink_H