winreparse.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef Py_WINREPARSE_H
  2. #define Py_WINREPARSE_H
  3. #ifdef MS_WINDOWS
  4. #include <Windows.h>
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. /* The following structure was copied from
  9. http://msdn.microsoft.com/en-us/library/ff552012.aspx as the required
  10. include doesn't seem to be present in the Windows SDK (at least as included
  11. with Visual Studio Express). */
  12. typedef struct _REPARSE_DATA_BUFFER {
  13. ULONG ReparseTag;
  14. USHORT ReparseDataLength;
  15. USHORT Reserved;
  16. union {
  17. struct {
  18. USHORT SubstituteNameOffset;
  19. USHORT SubstituteNameLength;
  20. USHORT PrintNameOffset;
  21. USHORT PrintNameLength;
  22. ULONG Flags;
  23. WCHAR PathBuffer[1];
  24. } SymbolicLinkReparseBuffer;
  25. struct {
  26. USHORT SubstituteNameOffset;
  27. USHORT SubstituteNameLength;
  28. USHORT PrintNameOffset;
  29. USHORT PrintNameLength;
  30. WCHAR PathBuffer[1];
  31. } MountPointReparseBuffer;
  32. struct {
  33. UCHAR DataBuffer[1];
  34. } GenericReparseBuffer;
  35. };
  36. } REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
  37. #define REPARSE_DATA_BUFFER_HEADER_SIZE FIELD_OFFSET(REPARSE_DATA_BUFFER,\
  38. GenericReparseBuffer)
  39. #define MAXIMUM_REPARSE_DATA_BUFFER_SIZE ( 16 * 1024 )
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43. #endif /* MS_WINDOWS */
  44. #endif /* !Py_WINREPARSE_H */