4 * Tape device IOCTL interface.
6 * This file is part of the w32api package.
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 #pragma GCC system_header
37 #define DD_TAPE_DEVICE_NAME "\\Device\\Tape"
38 #define DD_TAPE_DEVICE_NAME_U L"\\Device\\Tape"
40 #define IOCTL_TAPE_BASE FILE_DEVICE_TAPE
42 #define IOCTL_TAPE_CHECK_VERIFY CTL_CODE(IOCTL_TAPE_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
43 #define IOCTL_TAPE_CREATE_PARTITION CTL_CODE(IOCTL_TAPE_BASE, 0x000a, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
44 #define IOCTL_TAPE_ERASE CTL_CODE(IOCTL_TAPE_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
45 #define IOCTL_TAPE_FIND_NEW_DEVICES CTL_CODE(IOCTL_DISK_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
46 #define IOCTL_TAPE_GET_DRIVE_PARAMS CTL_CODE(IOCTL_TAPE_BASE, 0x0005, METHOD_BUFFERED, FILE_READ_ACCESS)
47 #define IOCTL_TAPE_GET_MEDIA_PARAMS CTL_CODE(IOCTL_TAPE_BASE, 0x0007, METHOD_BUFFERED, FILE_READ_ACCESS)
48 #define IOCTL_TAPE_GET_POSITION CTL_CODE(IOCTL_TAPE_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
49 #define IOCTL_TAPE_GET_STATUS CTL_CODE(IOCTL_TAPE_BASE, 0x0009, METHOD_BUFFERED, FILE_READ_ACCESS )
51 #define IOCTL_TAPE_PREPARE CTL_CODE(IOCTL_TAPE_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
52 #define IOCTL_TAPE_SET_DRIVE_PARAMS CTL_CODE(IOCTL_TAPE_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
53 #define IOCTL_TAPE_SET_MEDIA_PARAMS CTL_CODE(IOCTL_TAPE_BASE, 0x0008, METHOD_BUFFERED, FILE_READ_ACCESS)
54 #define IOCTL_TAPE_SET_POSITION CTL_CODE(IOCTL_TAPE_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS)
55 #define IOCTL_TAPE_WRITE_MARKS CTL_CODE(IOCTL_TAPE_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
58 typedef enum _TAPE_DRIVE_PROBLEM_TYPE
{
60 TapeDriveReadWriteWarning
,
61 TapeDriveReadWriteError
,
63 TapeDriveWriteWarning
,
66 TapeDriveHardwareError
,
67 TapeDriveUnsupportedMedia
,
68 TapeDriveScsiConnectionError
,
70 TapeDriveCleanDriveNow
,
71 TapeDriveMediaLifeExpired
,
73 } TAPE_DRIVE_PROBLEM_TYPE
;
79 #endif /* __NTDDTAPE_H */