jwaioevent.pas 12 KB

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