IOCTL_TAPE_LOG_SENSE10

Issue this command to obtain the log data of the requested log page/subpage from IBM® Magstar® tape device. The data 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_SENSE10 command.
#define MAX_LOG_SENSE 1024 // Maximum number of bytes the command will return
typedef struct _TAPE_LOG_SENSE_PARAMETERS_WITH_SUBPAGE{
  UCHAR          PageCode;         /* [IN] Log sense page        */
  UCHAR          SubPageCode;      /* [IN] Log sense subpage     */
  UCHAR          PC;               /* [IN] PC bit to be consistent with 
                                      previous Log Sense IOCTL   */
  UCHAR          reserved[2];      /* unused                     */
  ULONG          PageLength;       /* [OUT] number of valid bytes in data
                                      (log_page_header_size+page_length)*/
  ULONG          parm_pointer;     /* [IN]  specific parameter number at which
                                      the data begins                   */
  CHAR           LogData[MAX_LOG_SENSE_DATA];   /* [OUT] log sense data */
} TAPE_LOG_SENSE_PARAMETERS_WITH_SUBPAGE, *PTAPE_LOG_SENSE_PARAMETERS_WITH_SUBPAGE;
An example of the IOCTL_TAPE_LOG_SENSE10 command is

DWORD cb;
TAPE_LOG_SENSE_PARAMETERS_WITH_SUBPAGE logsense;
logsense.PageCode=0x10;
logsense.PageCode=0x01;
logsense.PC = 1;
DeviceIoControl(hDevice,
IOCTL_TAPE_LOG_SENSE10,
&logsense, (long)sizeof(TAPE_LOG_SENSE_PARAMETERS_WITH_SUBPAGE,
&logsense, (long)sizeof(TAPE_LOG_SENSE_PARAMETERS_WITH_SUBPAGE,
&cb, (LPOVERLAPPED) NULL);