home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / RTLWIN32.PAK / LMAT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  3.6 KB  |  143 lines

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