Leaked source code of windows server 2003
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.

117 lines
1.8 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2002-2004 Microsoft Corporation
  4. //
  5. // Module Name: volutil.h
  6. //
  7. // Description:
  8. // Utility functions for handling volumes
  9. //
  10. // Author: Jim Benton (jbenton) 30-Apr-2002
  11. //
  12. //////////////////////////////////////////////////////////////////////////////
  13. #pragma once
  14. #define GLOBALROOT_SIZE 14 // \\?\GLOBALROOT
  15. BOOL
  16. GetVolumeDrive(
  17. IN WCHAR* pwszVolumePath,
  18. IN DWORD cchDriveName,
  19. OUT WCHAR* pwszDriveNameBuf
  20. );
  21. BOOL
  22. VolumeSupportsQuotas(
  23. IN WCHAR* pwszVolume
  24. );
  25. BOOL
  26. VolumeIsValid(
  27. IN WCHAR* pwszVolume
  28. );
  29. DWORD
  30. VolumeIsDirty(
  31. IN WCHAR* pwszVolume,
  32. OUT BOOL* pfDirty
  33. );
  34. BOOL
  35. VolumeIsMountable(
  36. IN WCHAR* pwszVolume
  37. );
  38. BOOL
  39. VolumeHasMountPoints(
  40. IN WCHAR* pwszVolume
  41. );
  42. BOOL
  43. VolumeIsReady(
  44. IN WCHAR* pwszVolume
  45. );
  46. BOOL
  47. VolumeIsFloppy(
  48. IN WCHAR* pwszVolume
  49. );
  50. BOOL
  51. VolumeIsSystem(
  52. IN WCHAR* pwszVolume
  53. );
  54. BOOL
  55. VolumeHoldsPagefile(
  56. IN WCHAR* pwszVolume
  57. );
  58. DWORD
  59. GetDeviceName(
  60. IN WCHAR* pwszVolume,
  61. OUT WCHAR wszDeviceName[MAX_PATH+GLOBALROOT_SIZE]
  62. );
  63. BOOL
  64. VolumeMountPointExists(
  65. IN WCHAR* pwszVolume,
  66. IN WCHAR* pwszDirectory
  67. );
  68. void
  69. DeleteVolumeDriveLetter(
  70. IN WCHAR* pwszVolume,
  71. IN WCHAR* pwszDrivePath
  72. );
  73. HRESULT
  74. DeleteDriveLetterFromDB(
  75. IN WCHAR* pwszDriveLetter
  76. );
  77. DWORD
  78. LockVolume(
  79. IN HANDLE hVolume
  80. );
  81. BOOL IsDriveLetterAvailable (
  82. IN WCHAR* pwszDriveLetter
  83. );
  84. BOOL
  85. IsDriveLetterSticky(
  86. IN WCHAR* pwszDriveLetter
  87. );
  88. BOOL
  89. IsBootDrive(
  90. IN WCHAR* pwszDriveLetter
  91. );
  92. BOOL
  93. DeleteNetworkShare(
  94. IN WCHAR* pwszDriveRoot
  95. );