Tim Golden | 0321cf2 | 2014-05-05 19:46:17 +0100 | [diff] [blame] | 1 | #ifndef Py_WINREPARSE_H |
| 2 | #define Py_WINREPARSE_H |
| 3 | |
| 4 | #ifdef MS_WINDOWS |
Martin Panter | 70214ad | 2016-08-04 02:38:59 +0000 | [diff] [blame] | 5 | #include <windows.h> |
Tim Golden | 0321cf2 | 2014-05-05 19:46:17 +0100 | [diff] [blame] | 6 | |
| 7 | #ifdef __cplusplus |
| 8 | extern "C" { |
| 9 | #endif |
| 10 | |
| 11 | /* The following structure was copied from |
| 12 | http://msdn.microsoft.com/en-us/library/ff552012.aspx as the required |
Martin Panter | 70214ad | 2016-08-04 02:38:59 +0000 | [diff] [blame] | 13 | include km\ntifs.h isn't present in the Windows SDK (at least as included |
| 14 | with Visual Studio Express). Use unique names to avoid conflicting with |
| 15 | the structure as defined by Min GW. */ |
| 16 | typedef struct { |
Tim Golden | 0321cf2 | 2014-05-05 19:46:17 +0100 | [diff] [blame] | 17 | ULONG ReparseTag; |
| 18 | USHORT ReparseDataLength; |
| 19 | USHORT Reserved; |
| 20 | union { |
| 21 | struct { |
| 22 | USHORT SubstituteNameOffset; |
| 23 | USHORT SubstituteNameLength; |
| 24 | USHORT PrintNameOffset; |
| 25 | USHORT PrintNameLength; |
| 26 | ULONG Flags; |
| 27 | WCHAR PathBuffer[1]; |
| 28 | } SymbolicLinkReparseBuffer; |
| 29 | |
| 30 | struct { |
| 31 | USHORT SubstituteNameOffset; |
| 32 | USHORT SubstituteNameLength; |
| 33 | USHORT PrintNameOffset; |
| 34 | USHORT PrintNameLength; |
| 35 | WCHAR PathBuffer[1]; |
| 36 | } MountPointReparseBuffer; |
| 37 | |
| 38 | struct { |
| 39 | UCHAR DataBuffer[1]; |
| 40 | } GenericReparseBuffer; |
| 41 | }; |
Martin Panter | 70214ad | 2016-08-04 02:38:59 +0000 | [diff] [blame] | 42 | } _Py_REPARSE_DATA_BUFFER, *_Py_PREPARSE_DATA_BUFFER; |
Tim Golden | 0321cf2 | 2014-05-05 19:46:17 +0100 | [diff] [blame] | 43 | |
Martin Panter | 70214ad | 2016-08-04 02:38:59 +0000 | [diff] [blame] | 44 | #define _Py_REPARSE_DATA_BUFFER_HEADER_SIZE \ |
| 45 | FIELD_OFFSET(_Py_REPARSE_DATA_BUFFER, GenericReparseBuffer) |
| 46 | #define _Py_MAXIMUM_REPARSE_DATA_BUFFER_SIZE ( 16 * 1024 ) |
Tim Golden | 0321cf2 | 2014-05-05 19:46:17 +0100 | [diff] [blame] | 47 | |
| 48 | #ifdef __cplusplus |
| 49 | } |
| 50 | #endif |
| 51 | |
| 52 | #endif /* MS_WINDOWS */ |
| 53 | |
| 54 | #endif /* !Py_WINREPARSE_H */ |