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.

91 lines
2.1 KiB

  1. /******************************************************************
  2. // Copyright (c) 2000-2001 Microsoft Corporation, All Rights Reserved
  3. JOProcess.H -- WMI provider class definition
  4. Description:
  5. *******************************************************************/
  6. #if NTONLY >= 5
  7. #pragma once
  8. #define PROVIDER_NAME_WIN32NAMEDJOBOBJECTPROCESS L"Win32_NamedJobObjectProcess"
  9. _COM_SMARTPTR_TYPEDEF(CInstance, __uuidof(CInstance));
  10. class CJOProcess : public Provider
  11. {
  12. public:
  13. // Constructor/destructor
  14. //=======================
  15. CJOProcess(
  16. LPCWSTR lpwszClassName,
  17. LPCWSTR lpwszNameSpace);
  18. virtual ~CJOProcess();
  19. protected:
  20. // Reading Functions
  21. //============================
  22. virtual HRESULT ExecQuery(
  23. MethodContext *pMethodContext,
  24. CFrameworkQuery& Query,
  25. long lFlags);
  26. virtual HRESULT GetObject(
  27. CInstance* pInstance,
  28. long lFlags /*= 0L*/ );
  29. virtual HRESULT EnumerateInstances(
  30. MethodContext* pMethodContext,
  31. long lFlags);
  32. // Writing Functions
  33. //============================
  34. virtual HRESULT PutInstance(
  35. const CInstance& Instance,
  36. long lFlags = 0L);
  37. private:
  38. HRESULT FindSingleInstance(
  39. const CInstance* pInstance);
  40. HRESULT Create(
  41. const CInstance &JOInstance,
  42. const CInstance &ProcInstance);
  43. bool GetInstKey(
  44. CHString& chstrCollection,
  45. CHString& chstrCollectionID);
  46. HRESULT Enumerate(
  47. MethodContext *pMethodContext);
  48. HRESULT EnumerateProcsInJob(
  49. LPCWSTR wstrJobID,
  50. MethodContext *pMethodContext);
  51. void UndecorateJOName(
  52. LPCWSTR wstrDecoratedName,
  53. CHString& chstrUndecoratedJOName);
  54. void DecorateJOName(
  55. LPCWSTR wstrUndecoratedName,
  56. CHString& chstrDecoratedJOName);
  57. };
  58. #endif // #if NTONLY >= 5