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.

141 lines
3.4 KiB

  1. /*++ BUILD Version: 0006 // Increment this if a change has global effects
  2. Copyright (c) 1992-1999 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. #if _MSC_VER > 1000
  20. #pragma once
  21. #endif
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. //
  26. // The following bits are used with Flags field in structures below.
  27. //
  28. //
  29. // Do we exec programs for this job periodically (/EVERY switch)
  30. // or one time (/NEXT switch).
  31. //
  32. #define JOB_RUN_PERIODICALLY 0x01 // set if EVERY
  33. //
  34. // Was there an error last time we tried to exec a program on behalf of
  35. // this job.
  36. // This flag is meaningfull on output only!
  37. //
  38. #define JOB_EXEC_ERROR 0x02 // set if error
  39. //
  40. // Will this job run today or tomorrow.
  41. // This flag is meaningfull on output only!
  42. //
  43. #define JOB_RUNS_TODAY 0x04 // set if today
  44. //
  45. // Add current day of the month to DaysOfMonth input.
  46. // This flag is meaningfull on input only!
  47. //
  48. #define JOB_ADD_CURRENT_DATE 0x08 // set if to add current date
  49. //
  50. // Will this job be run interactively or not. Windows NT 3.1 do not
  51. // know about this bit, i.e. they submit interactive jobs only.
  52. //
  53. #define JOB_NONINTERACTIVE 0x10 // set for noninteractive
  54. #define JOB_INPUT_FLAGS ( JOB_RUN_PERIODICALLY | \
  55. JOB_ADD_CURRENT_DATE | \
  56. JOB_NONINTERACTIVE )
  57. #define JOB_OUTPUT_FLAGS ( JOB_RUN_PERIODICALLY | \
  58. JOB_EXEC_ERROR | \
  59. JOB_RUNS_TODAY | \
  60. JOB_NONINTERACTIVE )
  61. typedef struct _AT_INFO {
  62. DWORD_PTR JobTime;
  63. DWORD DaysOfMonth;
  64. UCHAR DaysOfWeek;
  65. UCHAR Flags;
  66. LPWSTR Command;
  67. } AT_INFO, *PAT_INFO, *LPAT_INFO;
  68. typedef struct _AT_ENUM {
  69. DWORD JobId;
  70. DWORD_PTR JobTime;
  71. DWORD DaysOfMonth;
  72. UCHAR DaysOfWeek;
  73. UCHAR Flags;
  74. LPWSTR Command;
  75. } AT_ENUM, *PAT_ENUM, *LPAT_ENUM;
  76. NET_API_STATUS NET_API_FUNCTION
  77. NetScheduleJobAdd(
  78. IN LPCWSTR Servername OPTIONAL,
  79. IN LPBYTE Buffer,
  80. OUT LPDWORD JobId
  81. );
  82. NET_API_STATUS NET_API_FUNCTION
  83. NetScheduleJobDel(
  84. IN LPCWSTR Servername OPTIONAL,
  85. IN DWORD MinJobId,
  86. IN DWORD MaxJobId
  87. );
  88. NET_API_STATUS NET_API_FUNCTION
  89. NetScheduleJobEnum(
  90. IN LPCWSTR Servername OPTIONAL,
  91. OUT LPBYTE * PointerToBuffer,
  92. IN DWORD PrefferedMaximumLength,
  93. OUT LPDWORD EntriesRead,
  94. OUT LPDWORD TotalEntries,
  95. IN OUT LPDWORD ResumeHandle
  96. );
  97. NET_API_STATUS NET_API_FUNCTION
  98. NetScheduleJobGetInfo(
  99. IN LPCWSTR Servername OPTIONAL,
  100. IN DWORD JobId,
  101. OUT LPBYTE * PointerToBuffer
  102. );
  103. #ifdef __cplusplus
  104. }
  105. #endif
  106. #endif // _LMAT_