blob: 66f7775dd2e81433e1595eee184bc9df5295c37d [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
5#include <Windows.h>
6
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
13 include doesn't seem to be present in the Windows SDK (at least as included
14 with Visual Studio Express). */
15typedef struct _REPARSE_DATA_BUFFER {
16 ULONG ReparseTag;
17 USHORT ReparseDataLength;
18 USHORT Reserved;
19 union {
20 struct {
21 USHORT SubstituteNameOffset;
22 USHORT SubstituteNameLength;
23 USHORT PrintNameOffset;
24 USHORT PrintNameLength;
25 ULONG Flags;
26 WCHAR PathBuffer[1];
27 } SymbolicLinkReparseBuffer;
28
29 struct {
30 USHORT SubstituteNameOffset;
31 USHORT SubstituteNameLength;
32 USHORT PrintNameOffset;
33 USHORT PrintNameLength;
34 WCHAR PathBuffer[1];
35 } MountPointReparseBuffer;
36
37 struct {
38 UCHAR DataBuffer[1];
39 } GenericReparseBuffer;
40 };
41} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
42
43#define REPARSE_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_DATA_BUFFER,\
44 GenericReparseBuffer)
45#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE ( 16 * 1024 )
46
47#ifdef __cplusplus
48}
49#endif
50
51#endif /* MS_WINDOWS */
52
53#endif /* !Py_WINREPARSE_H */