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.

132 lines
3.1 KiB

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