Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

133 lines
3.4 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. SxsPath.h
  5. Abstract:
  6. Author:
  7. Jay Krell (a-JayK) October 2000
  8. Revision History:
  9. --*/
  10. #pragma once
  11. /*-----------------------------------------------------------------------------
  12. \\machine\share -> \\?\unc\machine\share
  13. c:\foo -> \\?\c:\foo
  14. \\? -> \\?
  15. a\b\c -> \\?\c:\windows\a\b\c current-working-directory is c:\windows (can never be unc)
  16. -----------------------------------------------------------------------------*/
  17. BOOL
  18. FusionpConvertToBigPath(PCWSTR Path, SIZE_T BufferSize, PWSTR Buffer);
  19. #define MAXIMUM_BIG_PATH_GROWTH_CCH (NUMBER_OF(L"\\\\?\\unc\\"))
  20. /*-----------------------------------------------------------------------------
  21. \\?\unc\machine\share\bob
  22. \\?\c:\foo\bar ^
  23. --------^---------------------------------------------------------------------*/
  24. BOOL
  25. FusionpSkipBigPathRoot(PCWSTR s, OUT SIZE_T*);
  26. /*-----------------------------------------------------------------------------
  27. '\\' or '/'
  28. -----------------------------------------------------------------------------*/
  29. BOOL
  30. FusionpIsSlash(
  31. WCHAR ch
  32. );
  33. /*-----------------------------------------------------------------------------
  34. just the 52 chars a-zA-Z, need to check with fs
  35. -----------------------------------------------------------------------------*/
  36. BOOL
  37. FusionpIsDriveLetter(
  38. WCHAR ch
  39. );
  40. /*-----------------------------------------------------------------------------
  41. -----------------------------------------------------------------------------*/
  42. BOOL
  43. SxspIsUncPath(
  44. PCWSTR Path,
  45. BOOL*
  46. );
  47. /*-----------------------------------------------------------------------------
  48. -----------------------------------------------------------------------------*/
  49. //
  50. // This is not reliable.
  51. //
  52. // Nt Paths can look like absolute DOS/Win32 paths without the leading drive letter:
  53. // \foo\bar -> c:\foo\bar
  54. //
  55. // But we are not likely to get Nt paths that don't start with a double question mark:
  56. // \??\c:\foo\bar.
  57. //
  58. // (For example, on NT 3.x create a directory named \DosDevices, which is what \?? used to be
  59. // named..)
  60. //
  61. BOOL
  62. SxspIsNtPath(
  63. PCWSTR Path,
  64. BOOL*
  65. );
  66. /*-----------------------------------------------------------------------------
  67. //
  68. //
  69. // The acceptable forms are
  70. //
  71. // Win32 \\machine\share
  72. // Win32 c:\foo
  73. // NT \??\c:\foo
  74. // NT \??\unc\machine\share
  75. // Win32 \\?\c:\foo
  76. // Win32 \\?\unc\machine\share
  77. //
  78. // Anything with a colon is ambiguous. The colon could mean an NTFS alternate stream.
  79. // We never take that interpretation.
  80. //
  81. // The non fullpath \foo\bar is ambiguous. It could be an NT path.
  82. //
  83. // We are only checking for NT paths currently to assert that we don't get them.
  84. // We used to get them.
  85. //
  86. //
  87. -----------------------------------------------------------------------------*/
  88. BOOL
  89. SxspIsFullWin32OrNtPath(
  90. PCWSTR Path,
  91. BOOL* Result
  92. );
  93. //
  94. //
  95. //#define PATH_IS_REMOTE (0x00001)
  96. //#define PATH_IS_LOCAL (0x00002)
  97. //#define PATH_IS_WIN32 (0x00004)
  98. //#define PATH_IS_WIN32_LONG (0x00008) /* starts \\?\ */
  99. //#define PATH_IS_NT (0x00010)
  100. //#define PATH_IS_FULL (0x00020)
  101. //#define PATH_HAS_AMBIGUOUS_DRIVE_COLON_OR_NTFS_COLON (0x00040)
  102. //#define PATH_IS_AMBIGUOUS_WIN32_OR_NT (0x00080) /* does not start with one of c:\ or \?? or \\ */
  103. //
  104. //BOOL
  105. //SxspAnalyzePath(
  106. // PCWSTR Path,
  107. // PCWSTR* LastElement,
  108. // ULONG* PathCharacteristics
  109. // );
  110. //
  111. //