IOCTL_TAPE_GET_DENSITY
The IOCTL code for IOCTL_TAPE_GET_DENSITY is
defined as follows.
#define IOCTL_TAPE_GET_DENSITY \
CTL_CODE(IOCTL_TAPE_BASE, 0x000c, METHOD_BUFFERED, \
FILE_READ_ACCESS | FILE_WRITE_ACCESS).
The IOCTL reports density for supported devices by using the following
structure.
typedef struct _TAPE_DENSITY
{
UCHAR ucDensityCode;
UCHAR ucDefaultDensity;
UCHAR ucPendingDensity;
} TAPE_DENSITY, *PTAPE_DENSITY;
An example of the IOCTL_TAPE_GET_DENSITY command
is
TAPE_DENSITY tape_density = {0};
rc = DeviceIoControl(hDevice,
IOCTL_TAPE_GET_DENSITY,
NULL,
0,
&tape_density,
sizeof(TAPE_DENSITY),
&cb,
(LPOVERLAPPED) NULL);