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.

143 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. newmount.h
  5. Abstract:
  6. Replacement for mountie.h
  7. Author:
  8. Gor Nishanov (GorN) 31-July-1998
  9. Environment:
  10. User Mode
  11. Revision History:
  12. --*/
  13. typedef struct _MOUNTIE_PARTITION {
  14. LARGE_INTEGER StartingOffset;
  15. LARGE_INTEGER PartitionLength;
  16. DWORD PartitionNumber;
  17. UCHAR PartitionType;
  18. UCHAR DriveLetter;
  19. USHORT Reserved; // must be 0 //
  20. } MOUNTIE_PARTITION, *PMOUNTIE_PARTITION;
  21. // PARTITION_INFORMATION
  22. typedef struct _MOUNTIE_VOLUME {
  23. DWORD Signature;
  24. DWORD PartitionCount;
  25. MOUNTIE_PARTITION Partition[1];
  26. } MOUNTIE_VOLUME, *PMOUNTIE_VOLUME;
  27. #define NICE_DRIVE_LETTER(x) ((x)?(x):'?')
  28. NTSTATUS
  29. GetAssignedLetter (
  30. PWCHAR deviceName,
  31. PCHAR driveLetter
  32. );
  33. PVOID
  34. DoIoctlAndAllocate(
  35. IN HANDLE FileHandle,
  36. IN DWORD IoControlCode,
  37. IN PVOID InBuf,
  38. IN ULONG InBufSize,
  39. OUT LPDWORD BytesReturned
  40. );
  41. NTSTATUS
  42. DevfileOpen(
  43. OUT HANDLE *Handle,
  44. IN wchar_t *pathname
  45. );
  46. VOID
  47. DevfileClose(
  48. IN HANDLE Handle
  49. );
  50. DWORD
  51. MountieRecreateVolumeInfoFromHandle(
  52. IN HANDLE FileHandle,
  53. IN DWORD HarddiskNo,
  54. IN HANDLE ResourceHandle,
  55. IN OUT PMOUNTIE_INFO Info
  56. );
  57. VOID
  58. MountieCleanup(
  59. IN OUT PMOUNTIE_INFO Info
  60. );
  61. DWORD
  62. VolumesReady(
  63. IN PMOUNTIE_INFO Info,
  64. IN PDISK_RESOURCE ResourceEntry
  65. );
  66. DWORD
  67. MountieFindPartitionsForDisk(
  68. IN DWORD HarddiskNo,
  69. OUT PMOUNTIE_INFO MountieInfo
  70. );
  71. DWORD
  72. DisksGetLettersForSignature(
  73. IN PDISK_RESOURCE ResourceEntry
  74. );
  75. DWORD
  76. MountieUpdate(
  77. PMOUNTIE_INFO Info,
  78. PDISK_RESOURCE ResourceEntry
  79. );
  80. DWORD
  81. MountieVerify(
  82. PMOUNTIE_INFO info,
  83. PDISK_RESOURCE ResourceEntry,
  84. BOOL UseMountMgr
  85. );
  86. DWORD
  87. MountiePartitionCount(
  88. IN PMOUNTIE_INFO Info
  89. );
  90. PMOUNTIE_PARTITION
  91. MountiePartition(
  92. IN PMOUNTIE_INFO Info,
  93. IN DWORD Index
  94. );
  95. VOID
  96. MountiePrint(
  97. IN PMOUNTIE_INFO Info,
  98. IN HANDLE ResourceHandle
  99. );
  100. NTSTATUS
  101. DevfileIoctl(
  102. IN HANDLE Handle,
  103. IN DWORD Ioctl,
  104. IN PVOID InBuf,
  105. IN ULONG InBufSize,
  106. IN OUT PVOID OutBuf,
  107. IN DWORD OutBufSize,
  108. OUT LPDWORD returnLength
  109. );