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