home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / lmat.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  4KB  |  138 lines

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