jwaioevent.pas 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  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. // $Id: JwaIoEvent.pas,v 1.6 2005/09/03 14:27:48 marquardt Exp $
  43. unit JwaIoEvent;
  44. {$WEAKPACKAGEUNIT}
  45. {$HPPEMIT ''}
  46. {$HPPEMIT '#include "Ioevent.h"'}
  47. {$HPPEMIT ''}
  48. {$I jediapilib.inc}
  49. interface
  50. uses
  51. JwaWindows;
  52. //
  53. // Label change event. This event is signalled upon successful completion
  54. // of a label change. There is no additional data.
  55. //
  56. const
  57. GUID_IO_VOLUME_CHANGE: TGUID = (D1:$7373654a; D2:$812a; D3:$11d0; D4:($be, $c7, $08, $00, $2b, $e2, $09, $2f));
  58. {$EXTERNALSYM GUID_IO_VOLUME_CHANGE}
  59. //
  60. // Volume dismount event. This event is signalled when an attempt is made to
  61. // dismount a volume. There is no additional data. Note that this will not
  62. // necessarily be preceded by a GUID_IO_VOLUME_LOCK notification.
  63. //
  64. GUID_IO_VOLUME_DISMOUNT: TGUID = (D1:$d16a55e8; D2:$1059; D3:$11d2; D4:($8f, $fd, $00, $a0, $c9, $a0, $6d, $32));
  65. {$EXTERNALSYM GUID_IO_VOLUME_DISMOUNT}
  66. //
  67. // Volume dismount failed event. This event is signalled when a volume dismount fails.
  68. // There is no additional data.
  69. //
  70. GUID_IO_VOLUME_DISMOUNT_FAILED: TGUID = (D1:$e3c5b178; D2:$105d; D3:$11d2; D4:($8f, $fd, $00, $a0, $c9, $a0, $6d, $32));
  71. {$EXTERNALSYM GUID_IO_VOLUME_DISMOUNT_FAILED}
  72. //
  73. // Volume mount event. This event is signalled when a volume mount occurs.
  74. // There is no additional data.
  75. //
  76. GUID_IO_VOLUME_MOUNT: TGUID = (D1:$b5804878; D2:$1a96; D3:$11d2; D4:($8f, $fd, $00, $a0, $c9, $a0, $6d, $32));
  77. {$EXTERNALSYM GUID_IO_VOLUME_MOUNT}
  78. //
  79. // Volume lock event. This event is signalled when an attempt is made to
  80. // lock a volume. There is no additional data.
  81. //
  82. GUID_IO_VOLUME_LOCK: TGUID = (D1:$50708874; D2:$c9af; D3:$11d1; D4:($8f, $ef, $00, $a0, $c9, $a0, $6d, $32));
  83. {$EXTERNALSYM GUID_IO_VOLUME_LOCK}
  84. //
  85. // Volume lock failed event. This event is signalled when an attempt is made to
  86. // lock a volume, but it fails. There is no additional data.
  87. //
  88. GUID_IO_VOLUME_LOCK_FAILED: TGUID = (D1:$ae2eed10; D2:$0ba8; D3:$11d2; D4:($8f, $fb, $00, $a0, $c9, $a0, $6d, $32));
  89. {$EXTERNALSYM GUID_IO_VOLUME_LOCK_FAILED}
  90. //
  91. // Volume unlock event. This event is signalled when an attempt is made to
  92. // unlock a volume. There is no additional data.
  93. //
  94. GUID_IO_VOLUME_UNLOCK: TGUID = (D1:$9a8c3d68; D2:$d0cb; D3:$11d1; D4:($8f, $ef, $00, $a0, $c9, $a0, $6d, $32));
  95. {$EXTERNALSYM GUID_IO_VOLUME_UNLOCK}
  96. //
  97. // Volume name change. This event is signalled when the list of persistent
  98. // names (like drive letters) for a volume changes. There is no additional
  99. // data.
  100. //
  101. GUID_IO_VOLUME_NAME_CHANGE: TGUID = (D1:$2de97f83; D2:$4c06; D3:$11d2; D4:($a5, $32, $0, $60, $97, $13, $5, $5a));
  102. {$EXTERNALSYM GUID_IO_VOLUME_NAME_CHANGE}
  103. //
  104. // Volume physical configuration change. This event is signalled when the
  105. // physical makeup or current physical state of the volume changes.
  106. //
  107. GUID_IO_VOLUME_PHYSICAL_CONFIGURATION_CHANGE: TGUID = (D1:$2de97f84; D2:$4c06; D3:$11d2; D4:($a5, $32, $0, $60, $97, $13, $5, $5a));
  108. {$EXTERNALSYM GUID_IO_VOLUME_PHYSICAL_CONFIGURATION_CHANGE}
  109. //
  110. // Volume device interface. This is a device interface GUID that appears
  111. // when the device object associated with a volume is created and disappears
  112. // when the device object associated with the volume is destroyed.
  113. //
  114. GUID_IO_VOLUME_DEVICE_INTERFACE: TGUID = (D1:$53f5630d; D2:$b6bf; D3:$11d0; D4:($94, $f2, $00, $a0, $c9, $1e, $fb, $8b));
  115. {$EXTERNALSYM GUID_IO_VOLUME_DEVICE_INTERFACE}
  116. //
  117. // Sent when the removable media is changed (added, removed) from a device
  118. // (such as a CDROM, tape, changer, etc).
  119. //
  120. // The additional data is a DWORD representing the data event.
  121. //
  122. GUID_IO_MEDIA_ARRIVAL: TGUID = (D1:$d07433c0; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
  123. {$EXTERNALSYM GUID_IO_MEDIA_ARRIVAL}
  124. GUID_IO_MEDIA_REMOVAL: TGUID = (D1:$d07433c1; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
  125. {$EXTERNALSYM GUID_IO_MEDIA_REMOVAL}
  126. //
  127. // Sent when the media is returning that it is not ready right now, but will
  128. // be ready soon. This can be because the drive has spun down to save power
  129. // or because new media has been inserted but is not ready for access yet.
  130. //
  131. GUID_IO_DEVICE_BECOMING_READY: TGUID = (D1:$d07433f0; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
  132. {$EXTERNALSYM GUID_IO_DEVICE_BECOMING_READY}
  133. type
  134. _DEVICE_EVENT_BECOMING_READY = record
  135. Version: ULONG;
  136. Reason: ULONG;
  137. Estimated100msToReady: ULONG;
  138. end;
  139. {$EXTERNALSYM _DEVICE_EVENT_BECOMING_READY}
  140. DEVICE_EVENT_BECOMING_READY = _DEVICE_EVENT_BECOMING_READY;
  141. {$EXTERNALSYM DEVICE_EVENT_BECOMING_READY}
  142. PDEVICE_EVENT_BECOMING_READY = ^DEVICE_EVENT_BECOMING_READY;
  143. {$EXTERNALSYM PDEVICE_EVENT_BECOMING_READY}
  144. TDeviceEventBecomingReady = DEVICE_EVENT_BECOMING_READY;
  145. PDeviceEventBecomingReady = PDEVICE_EVENT_BECOMING_READY;
  146. //
  147. // Sent when the user presses the eject button on the front of the drive,
  148. // or when other buttons on the front are pressed via GESN command polling
  149. // (GESN support to be added)
  150. //
  151. const
  152. GUID_IO_DEVICE_EXTERNAL_REQUEST: TGUID = (D1:$d07433d0; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
  153. {$EXTERNALSYM GUID_IO_DEVICE_EXTERNAL_REQUEST}
  154. GUID_IO_MEDIA_EJECT_REQUEST: TGUID = (D1:$d07433d1; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
  155. {$EXTERNALSYM GUID_IO_MEDIA_EJECT_REQUEST}
  156. type
  157. PDEVICE_EVENT_EXTERNAL_REQUEST = ^DEVICE_EVENT_EXTERNAL_REQUEST;
  158. {$EXTERNALSYM PDEVICE_EVENT_EXTERNAL_REQUEST}
  159. _DEVICE_EVENT_EXTERNAL_REQUEST = record
  160. Version: ULONG;
  161. DeviceClass: ULONG; // 0 == MMC Storage Devices
  162. ButtonStatus: USHORT; // 1 == down, 2 == up
  163. Request: USHORT;
  164. SystemTime: LARGE_INTEGER; // for time-related info
  165. end;
  166. {$EXTERNALSYM _DEVICE_EVENT_EXTERNAL_REQUEST}
  167. DEVICE_EVENT_EXTERNAL_REQUEST = _DEVICE_EVENT_EXTERNAL_REQUEST;
  168. {$EXTERNALSYM DEVICE_EVENT_EXTERNAL_REQUEST}
  169. TDeviceEventExternalRequest = DEVICE_EVENT_EXTERNAL_REQUEST;
  170. PDeviceEventExternalRequest = PDEVICE_EVENT_EXTERNAL_REQUEST;
  171. //
  172. // Sent when a tape drive requires cleaning
  173. //
  174. const
  175. GUID_IO_DRIVE_REQUIRES_CLEANING: TGUID = (D1:$7207877c; D2:$90ed; D3:$44e5; D4:($a0, $0, $81, $42, $8d, $4c, $79, $bb));
  176. {$EXTERNALSYM GUID_IO_DRIVE_REQUIRES_CLEANING}
  177. //
  178. // Sent when a tape is erased
  179. //
  180. GUID_IO_TAPE_ERASE: TGUID = (D1:$852d11eb; D2:$4bb8; D3:$4507; D4:($9d, $9b, $41, $7c, $c2, $b1, $b4, $38));
  181. {$EXTERNALSYM GUID_IO_TAPE_ERASE}
  182. type
  183. _DEVICE_EVENT_GENERIC_DATA = record
  184. EventNumber: ULONG;
  185. end;
  186. {$EXTERNALSYM _DEVICE_EVENT_GENERIC_DATA}
  187. DEVICE_EVENT_GENERIC_DATA = _DEVICE_EVENT_GENERIC_DATA;
  188. {$EXTERNALSYM DEVICE_EVENT_GENERIC_DATA}
  189. PDEVICE_EVENT_GENERIC_DATA = ^DEVICE_EVENT_GENERIC_DATA;
  190. {$EXTERNALSYM PDEVICE_EVENT_GENERIC_DATA}
  191. TDeviceEventGenericData = DEVICE_EVENT_GENERIC_DATA;
  192. PDeviceEventGenericData = PDEVICE_EVENT_GENERIC_DATA;
  193. //
  194. // Represents any asynchronous notification coming from a device driver whose
  195. // notification protocol is RBC
  196. // Additional data is provided
  197. const
  198. GUID_DEVICE_EVENT_RBC: TGUID = (D1:$d0744792; D2:$a98e; D3:$11d2; D4:($91, $7a, $00, $a0, $c9, $06, $8f, $f3));
  199. {$EXTERNALSYM GUID_DEVICE_EVENT_RBC}
  200. type
  201. _DEVICE_EVENT_RBC_DATA = record
  202. EventNumber: ULONG;
  203. SenseQualifier: UCHAR;
  204. SenseCode: UCHAR;
  205. SenseKey: UCHAR;
  206. Reserved: UCHAR;
  207. Information: ULONG;
  208. end;
  209. {$EXTERNALSYM _DEVICE_EVENT_RBC_DATA}
  210. DEVICE_EVENT_RBC_DATA = _DEVICE_EVENT_RBC_DATA;
  211. {$EXTERNALSYM DEVICE_EVENT_RBC_DATA}
  212. PDEVICE_EVENT_RBC_DATA = ^DEVICE_EVENT_RBC_DATA;
  213. {$EXTERNALSYM PDEVICE_EVENT_RBC_DATA}
  214. TDeviceEventRbcData = DEVICE_EVENT_RBC_DATA;
  215. PDeviceEventRbcData = PDEVICE_EVENT_RBC_DATA;
  216. //
  217. // A clone of this disk has just arrived in the system.
  218. //
  219. const
  220. GUID_IO_DISK_CLONE_ARRIVAL: TGUID = (D1:$6a61885b; D2:$7c39; D3:$43dd; D4:($9b, $56, $b8, $ac, $22, $a5, $49, $aa));
  221. {$EXTERNALSYM GUID_IO_DISK_CLONE_ARRIVAL}
  222. type
  223. _GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION = record
  224. DiskNumber: ULONG; // The disk number of the new disk arriving in the system.
  225. end;
  226. {$EXTERNALSYM _GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION}
  227. GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION = _GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION;
  228. {$EXTERNALSYM GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION}
  229. PGUID_IO_DISK_CLONE_ARRIVAL_INFORMATION = ^GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION;
  230. {$EXTERNALSYM PGUID_IO_DISK_CLONE_ARRIVAL_INFORMATION}
  231. TGuidIoDiskCloneArrivalInformation = GUID_IO_DISK_CLONE_ARRIVAL_INFORMATION;
  232. PGuidIoDiskCloneArrivalInformation = PGUID_IO_DISK_CLONE_ARRIVAL_INFORMATION;
  233. //
  234. // The disk layout has changed
  235. //
  236. const
  237. GUID_IO_DISK_LAYOUT_CHANGE: TGUID = (D1:$11dff54c; D2:$8469; D3:$41f9; D4:($b3, $de, $ef, $83, $64, $87, $c5, $4a));
  238. {$EXTERNALSYM GUID_IO_DISK_LAYOUT_CHANGE}
  239. implementation
  240. end.