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.

87 lines
2.4 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1994 - 1996.
  5. //
  6. // File: jobprop.hxx
  7. //
  8. // Contents: Class to hold job property values.
  9. //
  10. // Classes: CJobProp
  11. //
  12. // History: 01-04-96 DavidMun Created
  13. //
  14. //----------------------------------------------------------------------------
  15. #ifndef __JOBPROP_HXX
  16. #define __JOBPROP_HXX
  17. //+---------------------------------------------------------------------------
  18. //
  19. // Class: CJobProp
  20. //
  21. // Purpose: Holds job properties, automatically frees them in dtor.
  22. //
  23. // History: 01-04-96 DavidMun Created
  24. // 05-02-96 DavidMun Remove objpath & dispid
  25. //
  26. // Notes: The purpose of this class is not to encapsulate (hide)
  27. // the property values, but to automatically initialize and
  28. // free them, plus provide convenient methods for operating
  29. // on them.
  30. //
  31. //----------------------------------------------------------------------------
  32. class CJobProp
  33. {
  34. public:
  35. CJobProp();
  36. ~CJobProp();
  37. VOID Clear();
  38. VOID Dump();
  39. HRESULT Parse(WCHAR **ppwsz);
  40. HRESULT InitFromActual(ITask *pJob);
  41. HRESULT SetActual(ITask *pJob);
  42. LPWSTR pwszAppName;
  43. LPWSTR pwszParams;
  44. LPWSTR pwszWorkingDirectory;
  45. LPWSTR pwszAccountName;
  46. LPWSTR pwszPassword;
  47. LPWSTR pwszComment;
  48. LPWSTR pwszCreator;
  49. DWORD dwPriority;
  50. DWORD dwFlags;
  51. DWORD dwTaskFlags;
  52. DWORD dwMaxRunTime;
  53. WORD wIdleWait;
  54. WORD wIdleDeadline;
  55. // Job's r/o props
  56. SYSTEMTIME stMostRecentRun;
  57. SYSTEMTIME stNextRun;
  58. HRESULT hrStartError;
  59. DWORD dwExitCode;
  60. HRESULT hrStatus;
  61. private:
  62. //
  63. // When Parse() reads the command line to set job properties, it turns
  64. // on bits in flSet and flSetFlags to indicate which of the numeric
  65. // values and dwFlags bits were specified on the command line.
  66. //
  67. // The string value properties don't need corresponding flags like this
  68. // because, after Parse() runs, because the string properties can act as
  69. // their own flags; if they're NULL the user didn't specify a value,
  70. // otherwise they point to a copy of the string the user specified.
  71. //
  72. ULONG _flSet;
  73. ULONG _flSetFlags;
  74. };
  75. #endif // __JOBPROP_HXX