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