winapi_ui_automation/um/
lmat.rs

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.
6use shared::basetsd::DWORD_PTR;
7use shared::lmcons::NET_API_STATUS;
8use shared::minwindef::{DWORD, LPBYTE, LPDWORD, UCHAR};
9use um::winnt::{LPCWSTR, LPWSTR};
10pub const JOB_RUN_PERIODICALLY: UCHAR = 0x01;
11pub const JOB_EXEC_ERROR: UCHAR = 0x02;
12pub const JOB_RUNS_TODAY: UCHAR = 0x04;
13pub const JOB_ADD_CURRENT_DATE: UCHAR = 0x08;
14pub const JOB_NONINTERACTIVE: UCHAR = 0x10;
15pub const JOB_INPUT_FLAGS: UCHAR = JOB_RUN_PERIODICALLY | JOB_ADD_CURRENT_DATE
16    | JOB_NONINTERACTIVE;
17pub const JOB_OUTPUT_FLAGS: UCHAR = JOB_RUN_PERIODICALLY | JOB_EXEC_ERROR | JOB_RUNS_TODAY
18    | JOB_NONINTERACTIVE;
19STRUCT!{struct AT_INFO {
20    JobTime: DWORD_PTR,
21    DaysOfMonth: DWORD,
22    DaysOfWeek: UCHAR,
23    Flags: UCHAR,
24    Command: LPWSTR,
25}}
26pub type PAT_INFO = *mut AT_INFO;
27pub type LPAT_INFO = *mut AT_INFO;
28STRUCT!{struct AT_ENUM {
29    JobId: DWORD,
30    JobTime: DWORD_PTR,
31    DaysOfMonth: DWORD,
32    DaysOfWeek: UCHAR,
33    Flags: UCHAR,
34    Command: LPWSTR,
35}}
36pub type PAT_ENUM = *mut AT_ENUM;
37pub type LPAT_ENUM = *mut AT_ENUM;
38extern "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}