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.

139 lines
4.4 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. volmgr.h
  5. Abstract:
  6. This file defines the services supplied by the volume managers.
  7. Author:
  8. norbertk
  9. Revision History:
  10. --*/
  11. #ifndef _VOLMGR_
  12. #define _VOLMGR_
  13. #include <volmgrx.h>
  14. #define IOCTL_INTERNAL_VOLMGR_PARTITION_ARRIVED CTL_CODE(VOLMGRCONTROLTYPE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
  15. #define IOCTL_INTERNAL_VOLMGR_PARTITION_REMOVED CTL_CODE(VOLMGRCONTROLTYPE, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
  16. #define IOCTL_INTERNAL_VOLMGR_WHOLE_DISK_REMOVED CTL_CODE(VOLMGRCONTROLTYPE, 2, METHOD_BUFFERED, FILE_ANY_ACCESS)
  17. #define IOCTL_INTERNAL_VOLMGR_REFERENCE_DEPENDANT_VOLUMES CTL_CODE(VOLMGRCONTROLTYPE, 3, METHOD_BUFFERED, FILE_ANY_ACCESS)
  18. #define IOCTL_INTERNAL_VOLMGR_LEGACY_PARTITION_ARRIVED CTL_CODE(VOLMGRCONTROLTYPE, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
  19. #define IOCTL_INTERNAL_VOLMGR_LEGACY_PARTITION_REMOVED CTL_CODE(VOLMGRCONTROLTYPE, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
  20. #define IOCTL_INTERNAL_VOLMGR_QUERY_CHANGE_PARTITION CTL_CODE(VOLMGRCONTROLTYPE, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
  21. #define IOCTL_INTERNAL_VOLMGR_CANCEL_CHANGE_PARTITION CTL_CODE(VOLMGRCONTROLTYPE, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
  22. #define IOCTL_INTERNAL_VOLMGR_PARTITION_CHANGED CTL_CODE(VOLMGRCONTROLTYPE, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
  23. #define IOCTL_INTERNAL_VOLMGR_PMWMICOUNTERLIB_CONTEXT CTL_CODE(VOLMGRCONTROLTYPE, 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
  24. #define IOCTL_INTERNAL_VOLMGR_SET_POWER_STATE CTL_CODE(VOLMGRCONTROLTYPE, 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
  25. //
  26. // Input structure for IOCTL_INTERNAL_VOLMGR_PARTITION_ARRIVED,
  27. // IOCTL_INTERNAL_VOLMGR_PARTITION_REMOVED,
  28. // IOCTL_INTERNAL_VOLMGR_REFERENCE_DEPENDANT_VOLUMES,
  29. // IOCTL_INTERNAL_VOLMGR_QUERY_CHANGE_PARTITION,
  30. // IOCTL_INTERNAL_VOLMGR_CANCEL_CHANGE_PARTITION, and
  31. // IOCTL_INTERNAL_VOLMGR_PARTITION_CHANGED.
  32. //
  33. typedef struct _VOLMGR_PARTITION_INFORMATION {
  34. PDEVICE_OBJECT PartitionDeviceObject;
  35. PDEVICE_OBJECT WholeDiskPdo;
  36. } VOLMGR_PARTITION_INFORMATION, *PVOLMGR_PARTITION_INFORMATION;
  37. //
  38. // Input structure for IOCTL_INTERNAL_VOLMGR_WHOLE_DISK_REMOVED.
  39. //
  40. typedef struct _VOLMGR_WHOLE_DISK_INFORMATION {
  41. PDEVICE_OBJECT WholeDiskPdo;
  42. } VOLMGR_WHOLE_DISK_INFORMATION, *PVOLMGR_WHOLE_DISK_INFORMATION;
  43. //
  44. // Output structure for IOCTL_INTERNAL_VOLMGR_REFERENCE_DEPENDANT_VOLUMES.
  45. //
  46. typedef struct _VOLMGR_DEPENDANT_VOLUMES_INFORMATION {
  47. PDEVICE_RELATIONS DependantVolumeReferences;
  48. } VOLMGR_DEPENDANT_VOLUMES_INFORMATION, *PVOLMGR_DEPENDANT_VOLUMES_INFORMATION;
  49. //
  50. // Input structure for IOCTL_INTERNAL_VOLMGR_LEGACY_PARTITION_ARRIVED and
  51. // IOCTL_INTERNAL_VOLMGR_LEGACY_PARTITION_REMOVED.
  52. //
  53. typedef struct _VOLMGR_LEGACY_PARTITION_INFORMATION {
  54. PDEVICE_OBJECT LegacyWholeDiskDeviceObject;
  55. ULONG DiskNumber;
  56. ULONG PartitionNumber;
  57. } VOLMGR_LEGACY_PARTITION_INFORMATION, *PVOLMGR_LEGACY_PARTITION_INFORMATION;
  58. //
  59. // Input structure for IOCTL_INTERNAL_VOLMGR_PMWMICOUNTERLIB_CONTEXT
  60. //
  61. typedef
  62. NTSTATUS
  63. (*PPMWMICOUNTERENABLE) (
  64. IN OUT PVOID* CounterContext
  65. );
  66. typedef
  67. BOOLEAN
  68. (*PPMWMICOUNTERDISABLE) (
  69. IN PVOID* CounterContext,
  70. IN BOOLEAN ForceDisable,
  71. IN BOOLEAN DeallocateOnZero
  72. );
  73. typedef
  74. VOID
  75. (*PPMWMICOUNTERIOSTART) (
  76. IN PVOID CounterContext,
  77. OUT PLARGE_INTEGER TimeStamp
  78. );
  79. typedef
  80. VOID
  81. (*PPMWMICOUNTERIOCOMPLETE) (
  82. IN PVOID CounterContext,
  83. IN PIRP Irp,
  84. IN PLARGE_INTEGER TimeStamp
  85. );
  86. typedef
  87. VOID
  88. (*PPMWMICOUNTERQUERY) (
  89. IN PVOID CounterContext,
  90. IN OUT PDISK_PERFORMANCE CounterBuffer,
  91. IN PWCHAR StorageManagerName,
  92. IN ULONG StorageDeviceNumber
  93. );
  94. typedef struct _PMWMICOUNTERLIB_CONTEXT {
  95. PPMWMICOUNTERENABLE PmWmiCounterEnable;
  96. PPMWMICOUNTERDISABLE PmWmiCounterDisable;
  97. PPMWMICOUNTERIOSTART PmWmiCounterIoStart;
  98. PPMWMICOUNTERIOCOMPLETE PmWmiCounterIoComplete;
  99. PPMWMICOUNTERQUERY PmWmiCounterQuery;
  100. } PMWMICOUNTERLIB_CONTEXT, *PPMWMICOUNTERLIB_CONTEXT;
  101. //
  102. // Input structure for IOCTL_INTERNAL_VOLMGR_SET_POWER_STATE
  103. //
  104. typedef struct _VOLMGR_POWER_STATE {
  105. PDEVICE_OBJECT PartitionDeviceObject;
  106. PDEVICE_OBJECT WholeDiskPdo;
  107. DEVICE_POWER_STATE PowerState;
  108. } VOLMGR_POWER_STATE, *PVOLMGR_POWER_STATE;
  109. #endif