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.

63 lines
1.2 KiB

  1. /*++
  2. Copyright (C) 1998-2001 Microsoft Corporation
  3. Module Name:
  4. Abstract:
  5. History:
  6. --*/
  7. //////////////////////////////////////////////////////////////////////
  8. //
  9. // Object.h
  10. //
  11. // CObject is a wrapper class for an IWbemClassObject.
  12. // The Wbem object must be created, and then passed as
  13. // a parameter upon CObject construction
  14. //
  15. //////////////////////////////////////////////////////////////////////
  16. #ifndef _OBJECT_H_
  17. #define _OBJECT_H_
  18. //#define MAX_PARAMS 128
  19. #include <arrtempl.h>
  20. class CInstance
  21. {
  22. IWbemClassObject *m_pObj; // WBEM object pointer
  23. WCHAR m_wcsNameSpace[1024]; // NameSpace for object
  24. WCHAR m_wcsName[512]; // Name of object
  25. long m_lID; // Refresher object ID
  26. class CParameter
  27. {
  28. CInstance* m_pInst;
  29. BSTR m_bstrParaName;
  30. VARIANT m_vInitValue;
  31. DWORD m_dwNumRefs;
  32. public:
  33. CParameter(CInstance* pInst, BSTR bstrName, VARIANT vInitValue);
  34. ~CParameter();
  35. void DumpStats(LONG lNumRefs);
  36. };
  37. CUniquePointerArray<CParameter> m_apParameter;
  38. friend CParameter;
  39. public:
  40. CInstance(WCHAR *wcsNameSpace, WCHAR *wcsName, IWbemClassObject *pObj, long lID);
  41. virtual ~CInstance();
  42. long GetID(){return m_lID;}
  43. void DumpObject(const WCHAR *wcsPrefix);
  44. void DumpStats(LONG lNumRefs);
  45. };
  46. #endif // _OBJECT_H_