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.

108 lines
4.4 KiB

  1. /******************************************************************************
  2. Copyright(c) Microsoft Corporation
  3. Module Name:
  4. change.h
  5. Abstract:
  6. This module contains the macros, user defined structures & function
  7. definitions needed by change.cpp
  8. Author:
  9. Venu Gopal Choudary 01-Mar-2001
  10. Revision History:
  11. Venu Gopal Choudary 01-Mar-2001 : Created it
  12. ******************************************************************************/
  13. #ifndef __CHANGE_H
  14. #define __CHANGE_H
  15. #pragma once
  16. #define MAX_CHANGE_OPTIONS 20
  17. #define OI_CHANGE_OPTION 0 // Index of -create option in cmdOptions structure.
  18. #define OI_CHANGE_USAGE 1 // Index of -? option in cmdOptions structure.
  19. #define OI_CHANGE_SERVER 2 // Index of -s option in cmdOptions structure.
  20. #define OI_CHANGE_USERNAME 3 // Index of -u option in cmdOptions structure.
  21. #define OI_CHANGE_PASSWORD 4 // Index of -p option in cmdOptions structure.
  22. #define OI_CHANGE_RUNASUSER 5 // Index of -ru option in cmdOptions structure.
  23. #define OI_CHANGE_RUNASPASSWORD 6 // Index of -rp option in cmdOptions structure.
  24. #define OI_CHANGE_TASKNAME 7 // Index of -taskname option in cmdOptions structure.
  25. #define OI_CHANGE_TASKRUN 8 // Index of -taskrun option in cmdOptions structure.
  26. #define OI_CHANGE_STARTTIME 9 // Index of -starttime option in cmdOptions structure.
  27. #define OI_CHANGE_STARTDATE 10 // Index of -startdate option in cmdOptions structure.
  28. #define OI_CHANGE_ENDDATE 11 // Index of -enddate option in cmdOptions structure.
  29. #define OI_CHANGE_IT 12 // Index of -it option in cmdOptions structure.
  30. #define OI_CHANGE_ENDTIME 13 // Index of -endtime option in cmdOptions structure.
  31. #define OI_CHANGE_DUR_END 14 // Index of -k option in cmdOptions structure.
  32. #define OI_CHANGE_DURATION 15 // Index of -du option in cmdOptions structure.
  33. #define OI_CHANGE_ENABLE 16 // Index of -enable option in cmdOptions structure.
  34. #define OI_CHANGE_DISABLE 17 // Index of -disable option in cmdOptions structure.
  35. #define OI_CHANGE_DELNOSCHED 18 // Index of -n option in cmdOptions structure.
  36. #define OI_CHANGE_REPEAT_INTERVAL 19 // Index of -ri option in cmdOptions structure.
  37. //#define OI_CHANGE_REPEAT_TASK 20 // Index of -rt option in cmdOptions structure.
  38. typedef struct __tagChangeSubOps
  39. {
  40. WCHAR *szServer ; // Server Name
  41. WCHAR *szRunAsUserName ; //Run As User Name
  42. WCHAR *szRunAsPassword; // Run As Password
  43. WCHAR *szUserName ; // User Name
  44. WCHAR *szPassword ; // Password
  45. WCHAR szTaskName [ MAX_JOB_LEN]; // Task Name
  46. WCHAR szStartTime[MAX_STRING_LENGTH] ; // Task start time
  47. WCHAR szEndTime [MAX_STRING_LENGTH]; // Task end time
  48. WCHAR szStartDate [MAX_STRING_LENGTH]; // Task start date
  49. WCHAR szEndDate [MAX_STRING_LENGTH]; // End Date of the Task
  50. WCHAR szTaskRun [MAX_TASK_LEN]; // executable name of task
  51. WCHAR szDuration [MAX_STRING_LENGTH]; //duration
  52. WCHAR szRepeat [MAX_STRING_LENGTH]; //Repetition Interval
  53. BOOL bChange; // /Change option
  54. BOOL bUsage; // /? option.
  55. BOOL bInteractive; // /it option
  56. BOOL bIsDurEnd; // /du option
  57. BOOL bEnable; // /enable option
  58. BOOL bDisable; // /disable option
  59. BOOL bDelIfNotSched; // /n option
  60. BOOL bIsRepeatTask ; // /rt option
  61. } TCHANGESUBOPTS, *PTCHANGESUBOPTS;
  62. typedef struct __tagChangeOptVals
  63. {
  64. //BOOL bSetStartDateToCurDate; // Is start date to be set to current date
  65. //BOOL bSetStartTimeToCurTime; // Is start date to be set to current date
  66. BOOL bPassword;
  67. BOOL bRunAsPassword;
  68. BOOL bNeedPassword;
  69. BOOL bFlag;
  70. } TCHANGEOPVALS;
  71. DWORD ValidateChangeOptions(DWORD argc, TCMDPARSER2 cmdChangeParser[],
  72. TCHANGESUBOPTS &tchgsubops, TCHANGEOPVALS &tchgoptvals );
  73. BOOL
  74. ReleaseChangeMemory(
  75. IN PTCHANGESUBOPTS pParams
  76. );
  77. DWORD
  78. ValidateChangeSuboptVal(
  79. OUT TCHANGESUBOPTS& tchgsubops,
  80. OUT TCHANGEOPVALS &tchgoptvals,
  81. IN TCMDPARSER2 cmdOptions[],
  82. IN DWORD dwScheduleType
  83. );
  84. #endif