blob: 28049c9af906642235e9009da8590fea6d2f88a4 [file] [log] [blame]
Tim Golden0321cf22014-05-05 19:46:17 +01001#ifndef Py_WINREPARSE_H
2#define Py_WINREPARSE_H
3
4#ifdef MS_WINDOWS
Martin Panter70214ad2016-08-04 02:38:59 +00005#include <windows.h>
Tim Golden0321cf22014-05-05 19:46:17 +01006
7#ifdef __cplusplus
8extern "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 Panter70214ad2016-08-04 02:38:59 +000013 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. */
16typedef struct {
Tim Golden0321cf22014-05-05 19:46:17 +010017 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 Panter70214ad2016-08-04 02:38:59 +000042} _Py_REPARSE_DATA_BUFFER, *_Py_PREPARSE_DATA_BUFFER;
Tim Golden0321cf22014-05-05 19:46:17 +010043
Martin Panter70214ad2016-08-04 02:38:59 +000044#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 Golden0321cf22014-05-05 19:46:17 +010047
48#ifdef __cplusplus
49}
50#endif
51
52#endif /* MS_WINDOWS */
53
54#endif /* !Py_WINREPARSE_H */