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.

112 lines
3.9 KiB

  1. // Copyright (c) 2000-2001 Microsoft Corporation, All Rights Reserved
  2. // CJobObjIOActgProps.h
  3. #pragma once
  4. //*****************************************************************************
  5. // BEGIN: Declaration of Win32_NamedJobObject class properties.
  6. //*****************************************************************************
  7. #define IDS_Win32_JobObjectIOAccountingInfo L"Win32_NamedJobObjectActgInfo"
  8. #define PROP_ALL_REQUIRED 0xFFFFFFFF
  9. #define PROP_NONE_REQUIRED 0x00000000
  10. #define PROP_JOIOActgID 0x00000001
  11. #define PROP_TotalUserTime 0x00000002
  12. #define PROP_TotalKernelTime 0x00000004
  13. #define PROP_ThisPeriodTotalUserTime 0x00000008
  14. #define PROP_ThisPeriodTotalKernelTime 0x00000010
  15. #define PROP_TotalPageFaultCount 0x00000020
  16. #define PROP_TotalProcesses 0x00000040
  17. #define PROP_ActiveProcesses 0x00000080
  18. #define PROP_TotalTerminatedProcesses 0x00000100
  19. #define PROP_ReadOperationCount 0x00000200
  20. #define PROP_WriteOperationCount 0x00000400
  21. #define PROP_OtherOperationCount 0x00000800
  22. #define PROP_ReadTransferCount 0x00001000
  23. #define PROP_WriteTransferCount 0x00002000
  24. #define PROP_OtherTransferCount 0x00004000
  25. #define PROP_PeakProcessMemoryUsed 0x00010000
  26. #define PROP_PeakJobMemoryUsed 0x00020000
  27. // The following enum is used to reference
  28. // into the array that follows it. Hence,
  29. // they must be kept in synch.
  30. typedef enum tag_JOB_OBJ_IOACTG_PROPS
  31. {
  32. JOIOACTGPROP_ID = 0,
  33. JOIOACTGPROP_TotalUserTime,
  34. JOIOACTGPROP_TotalKernelTime,
  35. JOIOACTGPROP_ThisPeriodTotalUserTime,
  36. JOIOACTGPROP_ThisPeriodTotalKernelTime,
  37. JOIOACTGPROP_TotalPageFaultCount,
  38. JOIOACTGPROP_TotalProcesses,
  39. JOIOACTGPROP_ActiveProcesses,
  40. JOIOACTGPROP_TotalTerminatedProcesses,
  41. JOIOACTGPROP_ReadOperationCount,
  42. JOIOACTGPROP_WriteOperationCount,
  43. JOIOACTGPROP_OtherOperationCount,
  44. JOIOACTGPROP_ReadTransferCount,
  45. JOIOACTGPROP_WriteTransferCount,
  46. JOIOACTGPROP_OtherTransferCount,
  47. JOIOACTGPROP_PeakProcessMemoryUsed,
  48. JOIOACTGPROP_PeakJobMemoryUsed,
  49. // used to keep track of how many props we have:
  50. JOIOACTGPROP_JobObjIOActgPropertyCount
  51. } JOB_OBJ_IOACTG_PROPS;
  52. // WARNING!! MUST KEEP MEMBERS OF THE FOLLOWING ARRAY
  53. // IN SYNCH WITH THE ENUMERATION DECLARED ABOVE!!!
  54. extern LPCWSTR g_rgJobObjIOActgPropNames[];
  55. //*****************************************************************************
  56. // END: Declaration of Win32_NamedJobObject class properties.
  57. //*****************************************************************************
  58. class CJobObjIOActgProps : public CObjProps
  59. {
  60. public:
  61. CJobObjIOActgProps() { m_hJob = NULL; }
  62. CJobObjIOActgProps(CHString& chstrNamespace);
  63. CJobObjIOActgProps(
  64. HANDLE hJob,
  65. CHString& chstrNamespace);
  66. virtual ~CJobObjIOActgProps();
  67. HRESULT SetKeysFromPath(
  68. const BSTR ObjectPath,
  69. IWbemContext __RPC_FAR *pCtx);
  70. HRESULT SetKeysDirect(
  71. std::vector<CVARIANT>& vecvKeys);
  72. HRESULT GetWhichPropsReq(
  73. CFrameworkQuery& cfwq);
  74. HRESULT SetNonKeyReqProps();
  75. HRESULT LoadPropertyValues(
  76. IWbemClassObject* pIWCO);
  77. void SetHandle(const HANDLE hJob);
  78. HANDLE& GetHandle();
  79. private:
  80. HANDLE m_hJob;
  81. // Member meant to only be called
  82. // by base class.
  83. static DWORD CheckProps(
  84. CFrameworkQuery& Query);
  85. };