jwaioevent.pas 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. {******************************************************************************}
  2. { }
  3. { IO Events API interface Unit for Object Pascal }
  4. { }
  5. { Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
  6. { Corporation. All Rights Reserved. }
  7. { }
  8. { The original file is: Ioevent.h, released June 2000. The original Pascal }
  9. { code is: IoEvent.pas, released December 2000. The initial developer of the }
  10. { Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
  11. { }
  12. { Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
  13. { Marcel van Brakel. All Rights Reserved. }
  14. { }
  15. { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
  16. { }
  17. { You may retrieve the latest version of this file at the Project JEDI }
  18. { APILIB home page, located at http://jedi-apilib.sourceforge.net }
  19. { }
  20. { The contents of this file are used with permission, subject to the Mozilla }
  21. { Public License Version 1.1 (the "License"); you may not use this file except }
  22. { in compliance with the License. You may obtain a copy of the License at }
  23. { http://www.mozilla.org/MPL/MPL-1.1.html }
  24. { }
  25. { Software distributed under the License is distributed on an "AS IS" basis, }
  26. { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
  27. { the specific language governing rights and limitations under the License. }
  28. { }
  29. { Alternatively, the contents of this file may be used under the terms of the }
  30. { GNU Lesser General Public License (the "LGPL License"), in which case the }
  31. { provisions of the LGPL License are applicable instead of those above. }
  32. { If you wish to allow use of your version of this file only under the terms }
  33. { of the LGPL License and not to allow others to use your version of this file }
  34. { under the MPL, indicate your decision by deleting the provisions above and }
  35. { replace them with the notice and other provisions required by the LGPL }
  36. { License. If you do not delete the provisions above, a recipient may use }
  37. { your version of this file under either the MPL or the LGPL License. }
  38. { }
  39. { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
  40. { }
  41. {******************************************************************************}
  42. unit JwaIoEvent;
  43. {$WEAKPACKAGEUNIT}
  44. {$HPPEMIT ''}
  45. {$HPPEMIT '#include "Ioevent.h"'}
  46. {$HPPEMIT ''}
  47. {$I jediapilib.inc}
  48. interface
  49. uses
  50. JwaWinType;
  51. //
  52. // Label change event. This event is signalled upon successful completion
  53. // of a label change. There is no additional data.
  54. //
  55. const
  56. GUID_IO_VOLUME_CHANGE: TGUID = (D1:$7373654a; D2:$812a; D3:$11d0; D4:($be, $c7, $08, $00, $2b, $e2, $09, $2f));
  57. {$EXTERNALSYM GUID_IO_VOLUME_CHANGE}
  58. //
  59. // Volume dismount event. This event is signalled when an attempt is made to
  60. // dismount a volume. There is no additional data. Note that this will not
  61. // necessarily be preceded by a GUID_IO_VOLUME_LOCK notification.
  62. //
  63. GUID_IO_VOLUME_DISMOUNT: TGUID = (D1:$d16a55e8; D2:$1059; D3:$11d2; D4:($8f, $fd, $00, $a0, $c9, $a0, $6d, $32));
  64. {$EXTERNALSYM GUID_IO_VOLUME_DISMOUNT}
  65. //
  66. // Volume dismount failed event. This event is signalled when a volume dismount fails.
  67. // There is no additional data.
  68. //
  69. GUID_IO_VOLUME_DISMOUNT_FAILED: TGUID = (D1:$e3c5b178; D2:$105d; D3:$11d2; D4:($8f, $fd, $00, $a0, $c9, $a0, $6d, $32));
  70. {$EXTERNALSYM GUID_IO_VOLUME_DISMOUNT_FAILED}
  71. //
  72. // Volume mount event. This event is signalled when a volume mount occurs.
  73. // There is no additional data.
  74. //
  75. GUID_IO_VOLUME_MOUNT: TGUID = (D1:$b5804878; D2:$1a96; D3:$11d2; D4:($8f, $fd, $00, $a0, $c9, $a0, $6d, $32));
  76. {$EXTERNALSYM GUID_IO_VOLUME_MOUNT}
  77. //
  78. // Volume lock event. This event is signalled when an attempt is made to
  79. // lock a volume. There is no additional data.
  80. //
  81. GUID_IO_VOLUME_LOCK: TGUID = (D1:$50708874; D2:$c9af; D3:$11d1; D4:($8f, $ef, $00, $a0, $c9, $a0, $6d, $32));
  82. {$EXTERNALSYM GUID_IO_VOLUME_LOCK}
  83. //
  84. // Volume lock failed event. This event is signalled when an attempt is made to
  85. // lock a volume, but it fails. There is no additional data.
  86. //
  87. GUID_IO_VOLUME_LOCK_FAILED: TGUID = (D1:$ae2eed10; D2:$0ba8; D3:$11d2; D4:($8f, $fb, $00, $a0, $c9, $a0, $6d, $32));
  88. {$EXTERNALSYM GUID_IO_VOLUME_LOCK_FAILED}
  89. //
  90. // Volume unlock event. This event is signalled when an attempt is made to
  91. // unlock a volume. There is no additional data.
  92. //
  93. GUID_IO_VOLUME_UNLOCK: TGUID = (D1:$9a8c3d68; D2:$d0cb; D3:$11d1; D4:($8f, $ef, $00, $a0, $c9, $a0, $6d, $32));
  94. {$EXTERNALSYM GUID_IO_VOLUME_UNLOCK}
  95. //
  96. // Volume name change. This event is signalled when the list of persistent
  97. // names (like drive letters) for a volume changes. There is no additional
  98. // data.
  99. //
  100. GUID_IO_VOLUME_NAME_CHANGE: TGUID = (D1:$2de97f83; D2:$4c06; D3:$11d2; D4:($a5, $32, $0, $60, $97, $13, $5, $5a));
  101. {$EXTERNALSYM GUID_IO_VOLUME_NAME_CHANGE}
  102. //
  103. // Volume physical configuration change. This event is signalled when the
  104. // physical makeup or current physical state of the volume changes.
  105. //
  106. GUID_IO_VOLUME_PHYSICAL_CONFIGURATION_CHANGE: TGUID = (D1:$2de97f84; D2:$4c06; D3:$11d2; D4:($a5, $32, $0, $60, $97, $13, $5, $5a));
  107. {$EXTERNALSYM GUID_IO_VOLUME_PHYSICAL_CONFIGURATION_CHANGE}
  108. //
  109. // Volume device interface. This is a device interface GUID that appears
  110. // when the device object associated with a volume is created and disappears
  111. // when the device object associated with the volume is destroyed.
  112. //
  113. GUID_IO_VOLUME_DEVICE_INTERFACE: TGUID = (D1:$53f5630d; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
  114. {$EXTERNALSYM GUID_IO_VOLUME_DEVICE_INTERFACE}
  115. //
  116. // Sent when the removable media is changed (added, removed) from a device
  117. // (such as a CDROM, tape, changer, etc).
  118. //
  119. // The additional data is a DWORD representing the data event.
  120. //
  121. GUID_IO_MEDIA_ARRIVAL: TGUID = (D1:$d07433c0; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
  122. {$EXTERNALSYM GUID_IO_MEDIA_ARRIVAL}
  123. GUID_IO_MEDIA_REMOVAL: TGUID = (D1:$d07433c1; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
  124. {$EXTERNALSYM GUID_IO_MEDIA_REMOVAL}
  125. //
  126. // Sent when the media is returning that it is not ready right now, but will
  127. // be ready soon. This can be because the drive has spun down to save power
  128. // or because new media has been inserted but is not ready for access yet.
  129. //
  130. GUID_IO_DEVICE_BECOMING_READY: TGUID = (D1:$d07433f0; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
  131. {$EXTERNALSYM GUID_IO_DEVICE_BECOMING_READY}
  132. type
  133. _DEVICE_EVENT_BECOMING_READY = record
  134. Version: ULONG;
  135. Reason: ULONG;
  136. Estimated100msToReady: ULONG;
  137. end;
  138. {$EXTERNALSYM _DEVICE_EVENT_BECOMING_READY}
  139. DEVICE_EVENT_BECOMING_READY = _DEVICE_EVENT_BECOMING_READY;
  140. {$EXTERNALSYM DEVICE_EVENT_BECOMING_READY}
  141. PDEVICE_EVENT_BECOMING_READY = ^DEVICE_EVENT_BECOMING_READY;
  142. {$EXTERNALSYM PDEVICE_EVENT_BECOMING_READY}
  143. TDeviceEventBecomingReady = DEVICE_EVENT_BECOMING_READY;
  144. PDeviceEventBecomingReady = PDEVICE_EVENT_BECOMING_READY;
  145. //
  146. // Sent when the user presses the eject button on the front of the drive,
  147. // or when other buttons on the front are pressed via GESN command polling
  148. // (GESN support to be added)
  149. //
  150. const
  151. GUID_IO_DEVICE_EXTERNAL_REQUEST: TGUID = (D1:$d07433d0; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
  152. {$EXTERNALSYM GUID_IO_DEVICE_EXTERNAL_REQUEST}
  153. GUID_IO_MEDIA_EJECT_REQUEST: TGUID = (D1:$d07433d1; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
  154. {$EXTERNALSYM GUID_IO_MEDIA_EJECT_REQUEST}
  155. type
  156. PDEVICE_EVENT_EXTERNAL_REQUEST = ^DEVICE_EVENT_EXTERNAL_REQUEST;
  157. {$EXTERNALSYM PDEVICE_EVENT_EXTERNAL_REQUEST}
  158. _DEVICE_EVENT_EXTERNAL_REQUEST = record
  159. Version: ULONG;
  160. DeviceClass: ULONG; // 0 == MMC Storage Devices
  161. ButtonStatus: USHORT; // 1 == down, 2 == up
  162. Request: USHORT;
  163. SystemTime: LARGE_INTEGER; // for time-related info
  164. end;
  165. {$EXTERNALSYM _DEVICE_EVENT_EXTERNAL_REQUEST}
  166. DEVICE_EVENT_EXTERNAL_REQUEST = _DEVICE_EVENT_EXTERNAL_REQUEST;
  167. {$EXTERNALSYM DEVICE_EVENT_EXTERNAL_REQUEST}
  168. TDeviceEventExternalRequest = DEVICE_EVENT_EXTERNAL_REQUEST;
  169. PDeviceEventExternalRequest = PDEVICE_EVENT_EXTERNAL_REQUEST;
  170. //
  171. // Sent when a tape drive requires cleaning
  172. //
  173. const
  174. GUID_IO_DRIVE_REQUIRES_CLEANING: TGUID = (D1:$7207877c; D2:$90ed; D3:$44e5; D4:($a0, $0, $81, $42, $8d, $4c, $79, $bb));
  175. {$EXTERNALSYM GUID_IO_DRIVE_REQUIRES_CLEANING}
  176. //
  177. // Sent when a tape is erased
  178. //
  179. GUID_IO_TAPE_ERASE: TGUID = (D1:$852d11eb; D2:$4bb8; D3:$4507; D4:($9d, $9b, $41, $7c, $c2, $b1, $b4, $38));
  180. {$EXTERNALSYM GUID_IO_TAPE_ERASE}
  181. type
  182. _DEVICE_EVENT_GENERIC_DATA = record
  183. EventNumber: ULONG;
  184. end;
  185. {$EXTERNALSYM _DEVICE_EVENT_GENERIC_DATA}
  186. DEVICE_EVENT_GENERIC_DATA = _DEVICE_EVENT_GENERIC_DATA;
  187. {$EXTERNALSYM DEVICE_EVENT_GENERIC_DATA}
  188. PDEVICE_EVENT_GENERIC_DATA = ^DEVICE_EVENT_GENERIC_DATA;
  189. {$EXTERNALSYM PDEVICE_EVENT_GENERIC_DATA}
  190. TDeviceEventGenericData = DEVICE_EVENT_GENERIC_DATA;
  191. PDeviceEventGenericData = PDEVICE_EVENT_GENERIC_DATA;
  192. //
  193. // Represents any asynchronous notification coming from a device driver whose
  194. // notification protocol is RBC
  195. // Additional data is provided
  196. const
  197. GUID_DEVICE_EVENT_RBC: TGUID = (D1:$d0744792; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
  198. {$EXTERNALSYM GUID_DEVICE_EVENT_RBC}
  199. type
  200. _DEVICE_EVENT_RBC_DATA = record
  201. EventNumber: ULONG;
  202. SenseQualifier: UCHAR;
  203. SenseCode: UCHAR;
  204. SenseKey: UCHAR;
  205. Reserved: UCHAR;
  206. Information: ULONG;
  207. end;
  208. {$EXTERNALSYM _DEVICE_EVENT_RBC_DATA}
  209. DEVICE_EVENT_RBC_DATA = _DEVICE_EVENT_RBC_DATA;
  210. {$EXTERNALSYM DEVICE_EVENT_RBC_DATA}
  211. PDEVICE_EVENT_RBC_DATA = ^DEVICE_EVENT_RBC_DATA;
  212. {$EXTERNALSYM PDEVICE_EVENT_RBC_DATA}
  213. TDeviceEventRbcData = DEVICE_EVENT_RBC_DATA;
  214. PDeviceEventRbcData = PDEVICE_EVENT_RBC_DATA;
  215. //
  216. // A clone of this disk has just arrived in the system.
  217. //
  218. const
  219. GUID_IO_DISK_CLONE_ARRIVAL: TGUID = (D1:$6a61885b; D2:$7c39; D3:$43dd; D4:($9b, $56, $b8, $ac, $22, $a5, $49, $aa));
  220. {$EXTERNALSYM GUID_IO_DISK_CLONE_ARRIVAL}
  221. type
  222. _GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION = record
  223. DiskNumber: ULONG; // The disk number of the new disk arriving in the system.
  224. end;
  225. {$EXTERNALSYM _GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION}
  226. GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION = _GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION;
  227. {$EXTERNALSYM GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION}
  228. PGUID_IO_DISK_CLONE_ARRIVAL_INFORMATION = ^GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION;
  229. {$EXTERNALSYM PGUID_IO_DISK_CLONE_ARRIVAL_INFORMATION}
  230. TGuidIoDiskCloneArrivalInformation = GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION;
  231. PGuidIoDiskCloneArrivalInformation = PGUID_IO_DISK_CLONE_ARRIVAL_INFORMATION;
  232. //
  233. // The disk layout has changed
  234. //
  235. const
  236. GUID_IO_DISK_LAYOUT_CHANGE: TGUID = (D1:$11dff54c; D2:$8469; D3:$41f9; D4:($b3, $de, $ef, $83, $64, $87, $c5, $4a));
  237. {$EXTERNALSYM GUID_IO_DISK_LAYOUT_CHANGE}
  238. implementation
  239. end.