Source code of Windows XP (NT5)
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.

60 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. DWORD m_dwWMIPID;
  21. HRESULT Connect( IWbemServices** ppNamespace, CPerfNameDb* pDefaultNameDb = NULL );
  22. HRESULT ConnectToNamespace( IWbemServices** ppNamespace );
  23. virtual void HandleConnectServerFailure( HRESULT hr );
  24. HRESULT VerifyNamespace( IWbemServices* pNS );
  25. virtual HRESULT VerifyProviderClasses( IWbemServices* pNS,
  26. LPCWSTR wszProvider,
  27. LPCWSTR wszGUID_Client,
  28. LPCWSTR wszGUID_Server = NULL);
  29. virtual HRESULT VerifyBaseClasses( IWbemServices* pNS );
  30. HRESULT VerifyByTemplate( IWbemServices* pNS, IWbemClassObject** ppTemplate, WCHAR* wcsClassName );
  31. HRESULT SetBaseClassQualifiers( IWbemClassObject* pBaseClass, BOOL bDefault );
  32. HRESULT SetProperties( IWbemClassObject* pPerfClass );
  33. public:
  34. CWMIBroker( WString wstrNamespace );
  35. virtual ~CWMIBroker();
  36. static HRESULT VerifyWMI();
  37. static HRESULT GetNamespace( WString wstrNamespace, IWbemServices** ppNamespace );
  38. };
  39. #endif // _WMIBROKER_H_