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.

58 lines
1.6 KiB

  1. /*++
  2. Copyright (C) 1999-2001 Microsoft Corporation
  3. Module Name:
  4. WMIBROKER.H
  5. Abstract:
  6. interface for the CWMIBroker class.
  7. History:
  8. --*/
  9. #ifndef _WMIBROKER_H_
  10. #define _WMIBROKER_H_
  11. #include <wbemcli.h>
  12. #include "perfndb.h"
  13. #define CLSID_NT5PerfProvider_V1 L"{FF37A93C-C28E-11d1-AEB6-00C04FB68820}"
  14. #define CLSID_NT5PerfProvider_V1_Srv L"{76A94DE3-7C26-44f5-8E98-C5AEA48186CB}"
  15. #define CLSID_HiPerfCooker_V1 L"{B0A2AB46-F612-4469-BEC4-7AB038BC476C}"
  16. #define CLSID_HiPerfCooker_V1_Srv L"{B0A2AB46-F612-4469-BEC4-7AB038BC476C}"
  17. class CWMIBroker
  18. {
  19. WString m_wstrNamespace;
  20. HRESULT Connect( IWbemServices** ppNamespace, CPerfNameDb* pDefaultNameDb = NULL );
  21. HRESULT ConnectToNamespace( IWbemServices** ppNamespace );
  22. virtual void HandleConnectServerFailure( HRESULT hr );
  23. HRESULT VerifyNamespace( IWbemServices* pNS );
  24. virtual HRESULT VerifyProviderClasses( IWbemServices* pNS,
  25. LPCWSTR wszProvider,
  26. LPCWSTR wszGUID_Client,
  27. LPCWSTR wszGUID_Server = NULL);
  28. virtual HRESULT VerifyBaseClasses( IWbemServices* pNS );
  29. HRESULT VerifyByTemplate( IWbemServices* pNS, IWbemClassObject** ppTemplate, WCHAR* wcsClassName );
  30. HRESULT SetBaseClassQualifiers( IWbemClassObject* pBaseClass, BOOL bDefault );
  31. HRESULT SetProperties( IWbemClassObject* pPerfClass );
  32. public:
  33. CWMIBroker( WString wstrNamespace );
  34. virtual ~CWMIBroker();
  35. static HRESULT GetNamespace( WString wstrNamespace, IWbemServices** ppNamespace );
  36. };
  37. #endif // _WMIBROKER_H_