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.

215 lines
5.6 KiB

  1. /*+++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. wmi.h
  5. Abstract:
  6. This file contains structures and defines for WMI
  7. that are used by minidrivers.
  8. Revision History:
  9. ---*/
  10. // begin_ntminitape
  11. //
  12. // LOG SENSE Page codes
  13. //
  14. #define TapeAlertLogPage 0x2E
  15. //
  16. // Type of tape drive alert information
  17. // supported by the drive.
  18. // For example, if the type is TapeAlertInfoNone, the drive doesn't
  19. // support any alert info. Need to use read\write error counters
  20. // to predict drive problems. If the type is TapeAlertInfoRequestSense,
  21. // request sense command can be used to determine drive problems.
  22. //
  23. typedef enum _TAPE_ALERT_INFO_TYPE {
  24. TapeAlertInfoNone,
  25. TapeAlertInfoRequestSense,
  26. TapeAlertInfoLogPage
  27. } TAPE_ALERT_INFO_TYPE;
  28. //
  29. // Tape alert information
  30. //
  31. #define READ_WARNING 1
  32. #define WRITE_WARNING 2
  33. #define HARD_ERROR 3
  34. #define MEDIA_ERROR 4
  35. #define READ_FAILURE 5
  36. #define WRITE_FAILURE 6
  37. #define MEDIA_LIFE 7
  38. #define NOT_DATA_GRADE 8
  39. #define WRITE_PROTECT 9
  40. #define NO_REMOVAL 10
  41. #define CLEANING_MEDIA 11
  42. #define UNSUPPORTED_FORMAT 12
  43. #define SNAPPED_TAPE 13
  44. #define CLEAN_NOW 20
  45. #define CLEAN_PERIODIC 21
  46. #define EXPIRED_CLEANING_MEDIA 22
  47. #define HARDWARE_A 30
  48. #define HARDWARE_B 31
  49. #define INTERFACE_ERROR 32
  50. #define EJECT_MEDIA 33
  51. #define DOWNLOAD_FAIL 34
  52. //
  53. // The following structs are duplicated from wmidata.h
  54. // wmidata.h is generated from wmicore.mof file. Should
  55. // the MOF file change for these structs, the corresponding
  56. // change should be made in these structs also.
  57. // Since minidrivers do not have access wmidata.h, we need
  58. // to duplicate it here.
  59. //
  60. // ISSUE : 02/28/2000 - nramas : Should find a better way to
  61. // handle the above. Duplication will cause problems in keeping
  62. // these definitions in sync.
  63. //
  64. typedef struct _WMI_TAPE_DRIVE_PARAMETERS
  65. {
  66. // Maximum block size supported
  67. ULONG MaximumBlockSize;
  68. // Minimum block size supported
  69. ULONG MinimumBlockSize;
  70. // Default block size supported
  71. ULONG DefaultBlockSize;
  72. // Maximum number of partitions allowed.
  73. ULONG MaximumPartitionCount;
  74. // TRUE if drive supports compression.
  75. BOOLEAN CompressionCapable;
  76. // TRUE if compression is enabled.
  77. BOOLEAN CompressionEnabled;
  78. // TRUE if drive reports setmarks
  79. BOOLEAN ReportSetmarks;
  80. // TRUE if drive supports hardware error correction
  81. BOOLEAN HardwareErrorCorrection;
  82. } WMI_TAPE_DRIVE_PARAMETERS, *PWMI_TAPE_DRIVE_PARAMETERS;
  83. typedef struct _WMI_TAPE_MEDIA_PARAMETERS
  84. {
  85. // Maximum capacity of the media
  86. ULONGLONG MaximumCapacity;
  87. // Available capacity of the media
  88. ULONGLONG AvailableCapacity;
  89. // Current blocksize
  90. ULONG BlockSize;
  91. // Current number of partitions
  92. ULONG PartitionCount;
  93. // TRUEif media is write protected
  94. BOOLEAN MediaWriteProtected;
  95. } WMI_TAPE_MEDIA_PARAMETERS, *PWMI_TAPE_MEDIA_PARAMETERS;
  96. typedef struct _WMI_TAPE_PROBLEM_WARNING
  97. {
  98. // Tape drive problem warning event
  99. ULONG DriveProblemType;
  100. // Tape drive problem data
  101. UCHAR TapeData[512];
  102. } WMI_TAPE_PROBLEM_WARNING, *PWMI_TAPE_PROBLEM_WARNING;
  103. typedef struct _WMI_TAPE_PROBLEM_IO_ERROR
  104. {
  105. // Read errors corrected without much delay
  106. ULONG ReadCorrectedWithoutDelay;
  107. // Read errors corrected with substantial delay
  108. ULONG ReadCorrectedWithDelay;
  109. // Total number of Read errors
  110. ULONG ReadTotalErrors;
  111. // Total number of read errors that were corrected
  112. ULONG ReadTotalCorrectedErrors;
  113. // Total number of uncorrected read errors
  114. ULONG ReadTotalUncorrectedErrors;
  115. // Number of times correction algorithm was processed for read
  116. ULONG ReadCorrectionAlgorithmProcessed;
  117. // Write errors corrected without much delay
  118. ULONG WriteCorrectedWithoutDelay;
  119. // Write errors corrected with substantial delay
  120. ULONG WriteCorrectedWithDelay;
  121. // Total number of Read errors
  122. ULONG WriteTotalErrors;
  123. // Total number of write errors that were corrected
  124. ULONG WriteTotalCorrectedErrors;
  125. // Total number of uncorrected write errors
  126. ULONG WriteTotalUncorrectedErrors;
  127. // Number of times correction algorithm was processed for write
  128. ULONG WriteCorrectionAlgorithmProcessed;
  129. // Errors not related to medium
  130. ULONG NonMediumErrors;
  131. } WMI_TAPE_PROBLEM_IO_ERROR, *PWMI_TAPE_PROBLEM_IO_ERROR;
  132. typedef struct _WMI_TAPE_PROBLEM_DEVICE_ERROR
  133. {
  134. // WARNING : Drive is experiencing read problem.
  135. BOOLEAN ReadWarning;
  136. // WARNING : Drive is experiencing write problem.
  137. BOOLEAN WriteWarning;
  138. // Drive hardware problem
  139. BOOLEAN HardError;
  140. // Critical Error : Too many read errors.
  141. BOOLEAN ReadFailure;
  142. // Critical Error : Too many write errors.
  143. BOOLEAN WriteFailure;
  144. // Tape format not supported
  145. BOOLEAN UnsupportedFormat;
  146. // Tape is snapped. Replace media
  147. BOOLEAN TapeSnapped;
  148. // Drive Requires Cleaning
  149. BOOLEAN DriveRequiresCleaning;
  150. // It's time to clean the drive
  151. BOOLEAN TimetoCleanDrive;
  152. // Hardware error. Check drive
  153. BOOLEAN DriveHardwareError;
  154. // Some error in cabling, or connection.
  155. BOOLEAN ScsiInterfaceError;
  156. // Critical Error : Media life expired.
  157. BOOLEAN MediaLife;
  158. } WMI_TAPE_PROBLEM_DEVICE_ERROR, *PWMI_TAPE_PROBLEM_DEVICE_ERROR;
  159. // end_ntminitape