IOCTL_TAPE_LOG_SENSE
Issue this command to obtain the log data of the requested log page from IBM® Magstar® tape device. The data that is returned is formatted according to the IBM Magstar hardware reference.
This IOCTL is only for the tape path.
The following input/output structure is used by the IOCTL_TAPE_LOG_SENSE command.
#define MAX_LOG_SENSE 1024 // Maximum number of bytes the command will return
typedef struct _TAPE_LOG_SENSE_PARAMETERS{
UCHAR PageCode; // The requested log page code
UCHAR PC; // PC = 0 for maximum values, 1 for current value, 3 for power-on values
UCHAR PageLength[2]; /* Length of returned data, filled in by the command */
UCHAR LogData[MAX_LOG_SENSE]; /* Log data, filled in by the command */
} TAPE_LOG_SENSE_PARAMETERS, *PTAPE_LOG_SENSE_PARAMETERS;
An example of the IOCTL_TAPE_LOG_SENSE command
is
DWORD cb;
TAPE_LOG_SENSE_PARAMETERS logsense;
logsense.PageCode=0;
logsense.PC = 1;
DeviceIoControl(hDevice,
IOCTL_TAPE_LOG_SENSE,
&logsense,
(long)sizeof(TAPE_LOG_SENSE_PARAMETERS,
&logsense,
(long)sizeof(TAPE_LOG_SENSE_PARAMETERS,
&cb,
(LPOVERLAPPED) NULL);