winapi_ui_automation/um/
bits2_0.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::UINT64;
7use shared::minwindef::DWORD;
8use um::bits::{IBackgroundCopyFile, IBackgroundCopyFileVtbl};
9use um::bits1_5::{IBackgroundCopyJob2, IBackgroundCopyJob2Vtbl};
10use um::winnt::{HRESULT, LPCWSTR};
11pub const BG_LENGTH_TO_EOF: UINT64 = -1i64 as u64;
12STRUCT!{struct BG_FILE_RANGE {
13    InitialOffset: UINT64,
14    Length: UINT64,
15}}
16pub const BG_COPY_FILE_OWNER: DWORD = 1;
17pub const BG_COPY_FILE_GROUP: DWORD = 2;
18pub const BG_COPY_FILE_DACL: DWORD = 4;
19pub const BG_COPY_FILE_SACL: DWORD = 8;
20pub const BG_COPY_FILE_ALL: DWORD = 15;
21RIDL!{#[uuid(0x443c8934, 0x90ff, 0x48ed, 0xbc, 0xde, 0x26, 0xf5, 0xc7, 0x45, 0x00, 0x42)]
22interface IBackgroundCopyJob3(IBackgroundCopyJob3Vtbl):
23    IBackgroundCopyJob2(IBackgroundCopyJob2Vtbl) {
24    fn ReplaceRemotePrefix(
25        OldPrefix: LPCWSTR,
26        NewPrefix: LPCWSTR,
27    ) -> HRESULT,
28    fn AddFileWithRanges(
29        RemoteUrl: LPCWSTR,
30        LocalName: LPCWSTR,
31        RangeCount: DWORD,
32        Ranges: *mut BG_FILE_RANGE,
33    ) -> HRESULT,
34    fn SetFileACLFlags(
35        Flags: DWORD,
36    ) -> HRESULT,
37    fn GetFileACLFlags(
38        Flags: *mut DWORD,
39    ) -> HRESULT,
40}}
41RIDL!{#[uuid(0x83e81b93, 0x0873, 0x474d, 0x8a, 0x8c, 0xf2, 0x01, 0x8b, 0x1a, 0x93, 0x9c)]
42interface IBackgroundCopyFile2(IBackgroundCopyFile2Vtbl):
43    IBackgroundCopyFile(IBackgroundCopyFileVtbl) {
44    fn GetFileRanges(
45        RangeCount: *mut DWORD,
46        Ranges: *mut *mut BG_FILE_RANGE,
47    ) -> HRESULT,
48    fn SetRemoteName(
49        Val: LPCWSTR,
50    ) -> HRESULT,
51}}