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.

137 lines
3.4 KiB

  1. /*++ BUILD Version: 0006 // Increment this if a change has global effects
  2. Copyright (c) 1992-1995 Microsoft Corporation
  3. Module Name:
  4. lmat.h
  5. Abstract:
  6. This file contains structures, function prototypes, and definitions
  7. for the schedule service API-s.
  8. Environment:
  9. User Mode - Win32
  10. Portable to any flat, 32-bit environment. (Uses Win32 typedefs.)
  11. Requires ANSI C extensions: slash-slash comments, long external names.
  12. Notes:
  13. You must include NETCONS.H before this file, since this file depends
  14. on values defined in NETCONS.H.
  15. Revision History:
  16. --*/
  17. #ifndef _LMAT_
  18. #define _LMAT_
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. //
  23. // The following bits are used with Flags field in structures below.
  24. //
  25. //
  26. // Do we exec programs for this job periodically (/EVERY switch)
  27. // or one time (/NEXT switch).
  28. //
  29. #define JOB_RUN_PERIODICALLY 0x01 // set if EVERY
  30. //
  31. // Was there an error last time we tried to exec a program on behalf of
  32. // this job.
  33. // This flag is meaningfull on output only!
  34. //
  35. #define JOB_EXEC_ERROR 0x02 // set if error
  36. //
  37. // Will this job run today or tomorrow.
  38. // This flag is meaningfull on output only!
  39. //
  40. #define JOB_RUNS_TODAY 0x04 // set if today
  41. //
  42. // Add current day of the month to DaysOfMonth input.
  43. // This flag is meaningfull on input only!
  44. //
  45. #define JOB_ADD_CURRENT_DATE 0x08 // set if to add current date
  46. //
  47. // Will this job be run interactively or not. Windows NT 3.1 do not
  48. // know about this bit, i.e. they submit interactive jobs only.
  49. //
  50. #define JOB_NONINTERACTIVE 0x10 // set for noninteractive
  51. #define JOB_INPUT_FLAGS ( JOB_RUN_PERIODICALLY | \
  52. JOB_ADD_CURRENT_DATE | \
  53. JOB_NONINTERACTIVE )
  54. #define JOB_OUTPUT_FLAGS ( JOB_RUN_PERIODICALLY | \
  55. JOB_EXEC_ERROR | \
  56. JOB_RUNS_TODAY | \
  57. JOB_NONINTERACTIVE )
  58. typedef struct _AT_INFO {
  59. DWORD JobTime;
  60. DWORD DaysOfMonth;
  61. UCHAR DaysOfWeek;
  62. UCHAR Flags;
  63. LPWSTR Command;
  64. } AT_INFO, *PAT_INFO, *LPAT_INFO;
  65. typedef struct _AT_ENUM {
  66. DWORD JobId;
  67. DWORD JobTime;
  68. DWORD DaysOfMonth;
  69. UCHAR DaysOfWeek;
  70. UCHAR Flags;
  71. LPWSTR Command;
  72. } AT_ENUM, *PAT_ENUM, *LPAT_ENUM;
  73. NET_API_STATUS NET_API_FUNCTION
  74. NetScheduleJobAdd(
  75. IN LPWSTR Servername OPTIONAL,
  76. IN LPBYTE Buffer,
  77. OUT LPDWORD JobId
  78. );
  79. NET_API_STATUS NET_API_FUNCTION
  80. NetScheduleJobDel(
  81. IN LPWSTR Servername OPTIONAL,
  82. IN DWORD MinJobId,
  83. IN DWORD MaxJobId
  84. );
  85. NET_API_STATUS NET_API_FUNCTION
  86. NetScheduleJobEnum(
  87. IN LPWSTR Servername OPTIONAL,
  88. OUT LPBYTE * PointerToBuffer,
  89. IN DWORD PrefferedMaximumLength,
  90. OUT LPDWORD EntriesRead,
  91. OUT LPDWORD TotalEntries,
  92. IN OUT LPDWORD ResumeHandle
  93. );
  94. NET_API_STATUS NET_API_FUNCTION
  95. NetScheduleJobGetInfo(
  96. IN LPWSTR Servername OPTIONAL,
  97. IN DWORD JobId,
  98. OUT LPBYTE * PointerToBuffer
  99. );
  100. #ifdef __cplusplus
  101. }
  102. #endif
  103. #endif // _LMAT_