• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef Py_WINREPARSE_H
2 #define Py_WINREPARSE_H
3 
4 #ifdef MS_WINDOWS
5 #include <windows.h>
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
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 {
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     };
42 } _Py_REPARSE_DATA_BUFFER, *_Py_PREPARSE_DATA_BUFFER;
43 
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 )
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 #endif /* MS_WINDOWS */
53 
54 #endif /* !Py_WINREPARSE_H */
55