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.

168 lines
2.7 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. NTSTATUS
  47. DevfileOpenEx(
  48. OUT HANDLE *Handle,
  49. IN wchar_t *pathname,
  50. IN ACCESS_MASK Access
  51. );
  52. VOID
  53. DevfileClose(
  54. IN HANDLE Handle
  55. );
  56. DWORD
  57. MountieRecreateVolumeInfoFromHandle(
  58. IN HANDLE FileHandle,
  59. IN DWORD HarddiskNo,
  60. IN HANDLE ResourceHandle,
  61. IN OUT PMOUNTIE_INFO Info
  62. );
  63. VOID
  64. MountieCleanup(
  65. IN OUT PMOUNTIE_INFO Info
  66. );
  67. DWORD
  68. VolumesReady(
  69. IN PMOUNTIE_INFO Info,
  70. IN PDISK_RESOURCE ResourceEntry
  71. );
  72. DWORD
  73. VolumesReadyLoop(
  74. IN PMOUNTIE_INFO Info,
  75. IN PDISK_RESOURCE ResourceEntry
  76. );
  77. DWORD
  78. MountieFindPartitionsForDisk(
  79. IN DWORD HarddiskNo,
  80. OUT PMOUNTIE_INFO MountieInfo
  81. );
  82. DWORD
  83. DisksGetLettersForSignature(
  84. IN PDISK_RESOURCE ResourceEntry
  85. );
  86. DWORD
  87. MountieUpdate(
  88. PMOUNTIE_INFO Info,
  89. PDISK_RESOURCE ResourceEntry
  90. );
  91. DWORD
  92. MountieVerify(
  93. PMOUNTIE_INFO info,
  94. PDISK_RESOURCE ResourceEntry,
  95. BOOL UseMountMgr
  96. );
  97. DWORD
  98. MountiePartitionCount(
  99. IN PMOUNTIE_INFO Info
  100. );
  101. PMOUNTIE_PARTITION
  102. MountiePartition(
  103. IN PMOUNTIE_INFO Info,
  104. IN DWORD Index
  105. );
  106. VOID
  107. MountiePrint(
  108. IN PMOUNTIE_INFO Info,
  109. IN HANDLE ResourceHandle
  110. );
  111. NTSTATUS
  112. DevfileIoctl(
  113. IN HANDLE Handle,
  114. IN DWORD Ioctl,
  115. IN PVOID InBuf,
  116. IN ULONG InBufSize,
  117. IN OUT PVOID OutBuf,
  118. IN DWORD OutBufSize,
  119. OUT LPDWORD returnLength
  120. );
  121. DWORD
  122. SetDiskInfoThread(
  123. LPVOID lpThreadParameter
  124. );
  125. DWORD
  126. MountieVerifyMsdosDrives(
  127. IN PMOUNTIE_INFO Info,
  128. IN PDISK_RESOURCE ResourceEntry
  129. );