home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / lmat.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  3.6 KB  |  144 lines

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