IOCTL_TAPE_OBTAIN_MTDEVICE

Issue this command to obtain the device number of a 3590 TotalStorage™ device in an IBM® 3494 Enterprise Tape Library. An error is returned if it is issued against a 3570 drive.

The following output structure is filled in by the IOCTL_TAPE_OBTAIN_MTDEVICE command.
typedef ULONG TAPE_OBTAIN_MTDEVICE, *PTAPE_OBTAIN_MTDEVICE;
An example of the IOCTL_TAPE_OBTAIN_MTDEVICE command is
int   *rc_ptr
DWORD cb;
TAPE_OBTAIN_MTDEVICE mt_device;

 *rc_ptr = DeviceIoControl(gp->ddHandle0,
                           IOCTL_TAPE_OBTAIN_MTDEVICE,
                           NULL,
                           0,
                           &mt_device,
                           (long)sizeof(TAPE_OBTAIN_MTDEVICE),
                           &cb,
                           (LPOVERLAPPED) NULL);
 if(*rc_ptr)
    printf(fp, "\nntutil MTDevice Info : %x\n\n", mt_device);
 else
	 /* Error handling code */