1 | //-------------------------------------------------------------------- |
---|
2 | // |
---|
3 | // Junction |
---|
4 | // Copyright (C) 1999 Mark Russinovich |
---|
5 | // Systems Internals - http://www.sysinternals.com |
---|
6 | // |
---|
7 | // Reparse point-related definitions and typedefs. |
---|
8 | // |
---|
9 | //-------------------------------------------------------------------- |
---|
10 | |
---|
11 | // |
---|
12 | // Maximum reparse buffer info size. The max user defined reparse |
---|
13 | // data is 16KB, plus there's a header. |
---|
14 | // |
---|
15 | #define MAX_REPARSE_SIZE 17000 |
---|
16 | |
---|
17 | #define IO_REPARSE_TAG_SYMBOLIC_LINK IO_REPARSE_TAG_RESERVED_ZERO |
---|
18 | #define IO_REPARSE_TAG_MOUNT_POINT (0xA0000003L) // winnt ntifs |
---|
19 | #define IO_REPARSE_TAG_HSM (0xC0000004L) // winnt ntifs |
---|
20 | #define IO_REPARSE_TAG_SIS (0x80000007L) // winnt ntifs |
---|
21 | |
---|
22 | |
---|
23 | // |
---|
24 | // Undocumented FSCTL_SET_REPARSE_POINT structure definition |
---|
25 | // |
---|
26 | #define REPARSE_MOUNTPOINT_HEADER_SIZE 8 |
---|
27 | typedef struct { |
---|
28 | DWORD ReparseTag; |
---|
29 | DWORD ReparseDataLength; |
---|
30 | WORD Reserved; |
---|
31 | WORD ReparseTargetLength; |
---|
32 | WORD ReparseTargetMaximumLength; |
---|
33 | WORD Reserved1; |
---|
34 | WCHAR ReparseTarget[1]; |
---|
35 | } REPARSE_MOUNTPOINT_DATA_BUFFER, *PREPARSE_MOUNTPOINT_DATA_BUFFER; |
---|
36 | |
---|
37 | |
---|
38 | typedef struct _REPARSE_DATA_BUFFER { |
---|
39 | ULONG ReparseTag; |
---|
40 | USHORT ReparseDataLength; |
---|
41 | USHORT Reserved; |
---|
42 | union { |
---|
43 | struct { |
---|
44 | USHORT SubstituteNameOffset; |
---|
45 | USHORT SubstituteNameLength; |
---|
46 | USHORT PrintNameOffset; |
---|
47 | USHORT PrintNameLength; |
---|
48 | WCHAR PathBuffer[1]; |
---|
49 | } SymbolicLinkReparseBuffer; |
---|
50 | struct { |
---|
51 | USHORT SubstituteNameOffset; |
---|
52 | USHORT SubstituteNameLength; |
---|
53 | USHORT PrintNameOffset; |
---|
54 | USHORT PrintNameLength; |
---|
55 | WCHAR PathBuffer[1]; |
---|
56 | } MountPointReparseBuffer; |
---|
57 | struct { |
---|
58 | UCHAR DataBuffer[1]; |
---|
59 | } GenericReparseBuffer; |
---|
60 | }; |
---|
61 | } REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER; |
---|
62 | |
---|