1 /* 2 * ntddtape.h 3 * 4 * Tape device IOCTL interface. 5 * 6 * This file is part of the w32api package. 7 * 8 * Contributors: 9 * Created by Casper S. Hornstrup <chorns (at) users.sourceforge.net> 10 * 11 * THIS SOFTWARE IS NOT COPYRIGHTED 12 * 13 * This source code is offered for use in the public domain. You may 14 * use, modify or distribute it freely. 15 * 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. 20 * 21 */ 22 23 #ifndef _NTDDTAPE_ 24 #define _NTDDTAPE_ 25 26 #include "ntddstor.h" 27 28 #ifdef __cplusplus 29 extern "C" { 30 #endif 31 32 #define DD_TAPE_DEVICE_NAME "\\Device\\Tape" 33 #define DD_TAPE_DEVICE_NAME_U L"\\Device\\Tape" 34 35 #define IOCTL_TAPE_BASE FILE_DEVICE_TAPE 36 37 #define IOCTL_TAPE_CHECK_VERIFY CTL_CODE(IOCTL_TAPE_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS) 38 #define IOCTL_TAPE_CREATE_PARTITION CTL_CODE(IOCTL_TAPE_BASE, 0x000a, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) 39 #define IOCTL_TAPE_ERASE CTL_CODE(IOCTL_TAPE_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) 40 #define IOCTL_TAPE_FIND_NEW_DEVICES CTL_CODE(IOCTL_DISK_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS) 41 #define IOCTL_TAPE_GET_DRIVE_PARAMS CTL_CODE(IOCTL_TAPE_BASE, 0x0005, METHOD_BUFFERED, FILE_READ_ACCESS) 42 #define IOCTL_TAPE_GET_MEDIA_PARAMS CTL_CODE(IOCTL_TAPE_BASE, 0x0007, METHOD_BUFFERED, FILE_READ_ACCESS) 43 #define IOCTL_TAPE_GET_POSITION CTL_CODE(IOCTL_TAPE_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS) 44 #define IOCTL_TAPE_GET_STATUS CTL_CODE(IOCTL_TAPE_BASE, 0x0009, METHOD_BUFFERED, FILE_READ_ACCESS) 45 46 #define IOCTL_TAPE_PREPARE CTL_CODE(IOCTL_TAPE_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS) 47 #define IOCTL_TAPE_SET_DRIVE_PARAMS CTL_CODE(IOCTL_TAPE_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) 48 #define IOCTL_TAPE_SET_MEDIA_PARAMS CTL_CODE(IOCTL_TAPE_BASE, 0x0008, METHOD_BUFFERED, FILE_READ_ACCESS) 49 #define IOCTL_TAPE_SET_POSITION CTL_CODE(IOCTL_TAPE_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS) 50 #define IOCTL_TAPE_WRITE_MARKS CTL_CODE(IOCTL_TAPE_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS) 51 52 53 typedef enum _TAPE_DRIVE_PROBLEM_TYPE { 54 TapeDriveProblemNone, 55 TapeDriveReadWriteWarning, 56 TapeDriveReadWriteError, 57 TapeDriveReadWarning, 58 TapeDriveWriteWarning, 59 TapeDriveReadError, 60 TapeDriveWriteError, 61 TapeDriveHardwareError, 62 TapeDriveUnsupportedMedia, 63 TapeDriveScsiConnectionError, 64 TapeDriveTimetoClean, 65 TapeDriveCleanDriveNow, 66 TapeDriveMediaLifeExpired, 67 TapeDriveSnappedTape 68 } TAPE_DRIVE_PROBLEM_TYPE; 69 70 #ifdef __cplusplus 71 } 72 #endif 73 74 #endif /* _NTDDTAPE_ */ 75