home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 May / Pcwk5b98.iso / Borland / Cplus45 / BC45 / MSINC.PAK / LMAT.H < prev    next >
C/C++ Source or Header  |  1995-08-29  |  4KB  |  149 lines

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