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.

84 lines
2.4 KiB

  1. // Copyright (c) 2000-2001 Microsoft Corporation, All Rights Reserved
  2. // JobObjectProv.h
  3. #pragma once
  4. //*****************************************************************************
  5. // BEGIN: Declaration of Win32_NamedJobObject class properties.
  6. //*****************************************************************************
  7. #define IDS_Win32_NamedJobObject L"Win32_NamedJobObject"
  8. #define IDS_EventClass L"Win32_JobObjectEvent"
  9. #define IDS_ExitCode L"ExitCode"
  10. // Win32_NamedJobObjectEvent class properties:
  11. #define IDS_Type L"Type"
  12. #define IDS_JobObjectID L"JobObjectID"
  13. #define IDS_PID L"PID"
  14. #define PROP_ALL_REQUIRED 0xFFFFFFFF
  15. #define PROP_NONE_REQUIRED 0x00000000
  16. #define PROP_ID 0x00000001
  17. #define PROP_JobObjectBasicUIRestrictions 0x00000002
  18. // The following enum is used to reference
  19. // into the array that follows it. Hence,
  20. // they must be kept in synch.
  21. typedef enum tag_JOB_OBJ_PROPS
  22. {
  23. JO_ID = 0,
  24. JO_JobObjectBasicUIRestrictions,
  25. // used to keep track of how many props we have:
  26. JO_JobObjectPropertyCount
  27. } JOB_OBJ_PROPS;
  28. // WARNING!! MUST KEEP MEMBERS OF THE FOLLOWING ARRAY
  29. // IN SYNCH WITH THE ENUMERATION DECLARED ABOVE!!!
  30. extern LPCWSTR g_rgJobObjPropNames[];
  31. //*****************************************************************************
  32. // END: Declaration of Win32_NamedJobObject class properties.
  33. //*****************************************************************************
  34. class CJobObjProps : public CObjProps
  35. {
  36. public:
  37. CJobObjProps() { m_hJob = NULL; }
  38. CJobObjProps(CHString& chstrNamespace);
  39. CJobObjProps(
  40. HANDLE hJob,
  41. CHString& chstrNamespace);
  42. virtual ~CJobObjProps();
  43. HRESULT SetKeysFromPath(
  44. const BSTR ObjectPath,
  45. IWbemContext __RPC_FAR *pCtx);
  46. HRESULT SetKeysDirect(
  47. std::vector<CVARIANT>& vecvKeys);
  48. HRESULT GetWhichPropsReq(
  49. CFrameworkQuery& cfwq);
  50. HRESULT SetNonKeyReqProps();
  51. HRESULT LoadPropertyValues(
  52. IWbemClassObject* pIWCO);
  53. void SetHandle(const HANDLE hJob);
  54. HANDLE& GetHandle();
  55. private:
  56. HANDLE m_hJob;
  57. // Member meant to only be called
  58. // by base class.
  59. static DWORD CheckProps(
  60. CFrameworkQuery& Query);
  61. };