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.

261 lines
5.1 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. fileinfo.c
  5. Abstract:
  6. This module implements the NtQueryInformationFile and
  7. NtQueryVolumeInformationFile API's for the NT datagram receiver (bowser).
  8. Author:
  9. Larry Osterman (larryo) 6-May-1991
  10. Revision History:
  11. 6-May-1991 larryo
  12. Created
  13. --*/
  14. #include "precomp.h"
  15. #pragma hdrstop
  16. NTSTATUS
  17. BowserCommonQueryVolumeInformationFile (
  18. IN BOOLEAN Wait,
  19. IN PBOWSER_FS_DEVICE_OBJECT DeviceObject,
  20. IN PIRP Irp
  21. );
  22. NTSTATUS
  23. BowserCommonQueryInformationFile (
  24. IN BOOLEAN Wait,
  25. IN PBOWSER_FS_DEVICE_OBJECT DeviceObject,
  26. IN PIRP Irp
  27. );
  28. #ifdef ALLOC_PRAGMA
  29. #pragma alloc_text(PAGE, BowserFspQueryVolumeInformationFile)
  30. #pragma alloc_text(PAGE, BowserFsdQueryVolumeInformationFile)
  31. #pragma alloc_text(PAGE, BowserCommonQueryVolumeInformationFile)
  32. #pragma alloc_text(PAGE, BowserFspQueryInformationFile)
  33. #pragma alloc_text(PAGE, BowserFsdQueryInformationFile)
  34. #pragma alloc_text(PAGE, BowserCommonQueryInformationFile)
  35. #endif
  36. NTSTATUS
  37. BowserFspQueryVolumeInformationFile (
  38. IN PBOWSER_FS_DEVICE_OBJECT DeviceObject,
  39. IN PIRP Irp
  40. )
  41. /*++
  42. Routine Description:
  43. This routine is called when the last handle to the NT Bowser device
  44. driver is closed.
  45. Arguments:
  46. IN PDEVICE_OBJECT DeviceObject - Supplies a device object for the request.
  47. IN PIRP Irp - Supplies an IRP for the create request.
  48. Return Value:
  49. NTSTATUS - Final Status of operation
  50. --*/
  51. {
  52. NTSTATUS Status;
  53. PAGED_CODE();
  54. Status = BowserCommonQueryVolumeInformationFile (TRUE,
  55. DeviceObject,
  56. Irp);
  57. return Status;
  58. }
  59. NTSTATUS
  60. BowserFsdQueryVolumeInformationFile (
  61. IN PBOWSER_FS_DEVICE_OBJECT DeviceObject,
  62. IN PIRP Irp
  63. )
  64. /*++
  65. Routine Description:
  66. This routine is called when the last handle to the NT Bowser device
  67. driver is closed.
  68. Arguments:
  69. IN PDEVICE_OBJECT DeviceObject - Supplies a device object for the request.
  70. IN PIRP Irp - Supplies an IRP for the create request.
  71. Return Value:
  72. NTSTATUS - Final Status of operation
  73. --*/
  74. {
  75. NTSTATUS Status;
  76. PAGED_CODE();
  77. Status = BowserCommonQueryVolumeInformationFile (IoIsOperationSynchronous(Irp),
  78. DeviceObject,
  79. Irp);
  80. return Status;
  81. }
  82. NTSTATUS
  83. BowserCommonQueryVolumeInformationFile (
  84. IN BOOLEAN Wait,
  85. IN PBOWSER_FS_DEVICE_OBJECT DeviceObject,
  86. IN PIRP Irp
  87. )
  88. /*++
  89. Routine Description:
  90. This routine is called when the last handle to the NT Bowser device
  91. driver is closed.
  92. Arguments:
  93. IN PDEVICE_OBJECT DeviceObject - Supplies a device object for the request.
  94. IN PIRP Irp - Supplies an IRP for the create request.
  95. Return Value:
  96. NTSTATUS - Final Status of operation
  97. --*/
  98. {
  99. NTSTATUS Status = STATUS_SUCCESS;
  100. PAGED_CODE();
  101. BowserCompleteRequest(Irp, Status);
  102. return Status;
  103. DBG_UNREFERENCED_PARAMETER(Wait);
  104. UNREFERENCED_PARAMETER(DeviceObject);
  105. }
  106. NTSTATUS
  107. BowserFspQueryInformationFile (
  108. IN PBOWSER_FS_DEVICE_OBJECT DeviceObject,
  109. IN PIRP Irp
  110. )
  111. /*++
  112. Routine Description:
  113. This routine is called when the last handle to the NT Bowser device
  114. driver is closed.
  115. Arguments:
  116. IN PDEVICE_OBJECT DeviceObject - Supplies a device object for the request.
  117. IN PIRP Irp - Supplies an IRP for the create request.
  118. Return Value:
  119. NTSTATUS - Final Status of operation
  120. --*/
  121. {
  122. NTSTATUS Status;
  123. PAGED_CODE();
  124. Status = BowserCommonQueryInformationFile (TRUE,
  125. DeviceObject,
  126. Irp);
  127. return Status;
  128. }
  129. NTSTATUS
  130. BowserFsdQueryInformationFile (
  131. IN PBOWSER_FS_DEVICE_OBJECT DeviceObject,
  132. IN PIRP Irp
  133. )
  134. /*++
  135. Routine Description:
  136. This routine is called when the last handle to the NT Bowser device
  137. driver is closed.
  138. Arguments:
  139. IN PDEVICE_OBJECT DeviceObject - Supplies a device object for the request.
  140. IN PIRP Irp - Supplies an IRP for the create request.
  141. Return Value:
  142. NTSTATUS - Final Status of operation
  143. --*/
  144. {
  145. NTSTATUS Status;
  146. PAGED_CODE();
  147. Status = BowserCommonQueryInformationFile(IoIsOperationSynchronous(Irp),
  148. DeviceObject,
  149. Irp);
  150. return Status;
  151. }
  152. NTSTATUS
  153. BowserCommonQueryInformationFile (
  154. IN BOOLEAN Wait,
  155. IN PBOWSER_FS_DEVICE_OBJECT DeviceObject,
  156. IN PIRP Irp
  157. )
  158. /*++
  159. Routine Description:
  160. This routine is called when the last handle to the NT Bowser device
  161. driver is closed.
  162. Arguments:
  163. IN PDEVICE_OBJECT DeviceObject - Supplies a device object for the request.
  164. IN PIRP Irp - Supplies an IRP for the create request.
  165. Return Value:
  166. NTSTATUS - Final Status of operation
  167. --*/
  168. {
  169. //
  170. // Return an error until we figure out valid information to return.
  171. NTSTATUS Status = STATUS_NOT_IMPLEMENTED;
  172. PAGED_CODE();
  173. BowserCompleteRequest(Irp, Status);
  174. return Status;
  175. DBG_UNREFERENCED_PARAMETER(Wait);
  176. UNREFERENCED_PARAMETER(DeviceObject);
  177. }