Debian Codegraph @

third_party/rust/winapi/src/um/lmat.rs

raw
1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms.
6 use shared::basetsd::DWORD_PTR;
7 use shared::lmcons::NET_API_STATUS;
8 use shared::minwindef::{DWORD, LPBYTE, LPDWORD, UCHAR};
9 use um::winnt::{LPCWSTR, LPWSTR};
10 pub const JOB_RUN_PERIODICALLY: UCHAR = 0x01;
11 pub const JOB_EXEC_ERROR: UCHAR = 0x02;
12 pub const JOB_RUNS_TODAY: UCHAR = 0x04;
13 pub const JOB_ADD_CURRENT_DATE: UCHAR = 0x08;
14 pub const JOB_NONINTERACTIVE: UCHAR = 0x10;
15 pub const JOB_INPUT_FLAGS: UCHAR = JOB_RUN_PERIODICALLY | JOB_ADD_CURRENT_DATE
16 | JOB_NONINTERACTIVE;
17 pub const JOB_OUTPUT_FLAGS: UCHAR = JOB_RUN_PERIODICALLY | JOB_EXEC_ERROR | JOB_RUNS_TODAY
18 | JOB_NONINTERACTIVE;
19 STRUCT!{struct AT_INFO {
20 JobTime: DWORD_PTR,
21 DaysOfMonth: DWORD,
22 DaysOfWeek: UCHAR,
23 Flags: UCHAR,
24 Command: LPWSTR,
25 }}
26 pub type PAT_INFO = *mut AT_INFO;
27 pub type LPAT_INFO = *mut AT_INFO;
28 STRUCT!{struct AT_ENUM {
29 JobId: DWORD,
30 JobTime: DWORD_PTR,
31 DaysOfMonth: DWORD,
32 DaysOfWeek: UCHAR,
33 Flags: UCHAR,
34 Command: LPWSTR,
35 }}
36 pub type PAT_ENUM = *mut AT_ENUM;
37 pub type LPAT_ENUM = *mut AT_ENUM;
38 extern "system" {
39 pub fn NetScheduleJobAdd(
40 Servername: LPCWSTR,
41 Buffer: LPBYTE,
42 JobId: LPDWORD,
43 ) -> NET_API_STATUS;
44 pub fn NetScheduleJobDel(
45 Servername: LPCWSTR,
46 MinJobId: DWORD,
47 MaxJobId: DWORD,
48 ) -> NET_API_STATUS;
49 pub fn NetScheduleJobEnum(
50 Servername: LPCWSTR,
51 PointerToBuffer: *mut LPBYTE,
52 PointerToBuffer: DWORD,
53 EntriesRead: LPDWORD,
54 TotalEntries: LPDWORD,
55 ResumeHandle: LPDWORD,
56 ) -> NET_API_STATUS;
57 pub fn NetScheduleJobGetInfo(
58 Servername: LPCWSTR,
59 JobId: DWORD,
60 PointerToBuffer: *mut LPBYTE,
61 ) -> NET_API_STATUS;
62 }