StoreEver Tape Storage
1748235 Members
3519 Online
108759 Solutions
New Discussion юеВ

DeviceIoControl() and Autoloader 1/9

 
Jonathan Wiebe
New Member

DeviceIoControl() and Autoloader 1/9

Hi

I am trying to write an application that is able to issue commands to the autoloader through the Win32 DeviceIoControl() function. I am not having any success. I can open the ultrium tape drive with CreateFile and read/write to it.

Win2000, PIII 1GigHz, Ultrium tape drive and Autoloader 1/9 with lto tapes.

HP Tape Tools finds the Autoloader and can issue commands to it in the tests ...

My questions are:

Do I need to open the Autoloader as if it was a separate device, i.e. get another HANDLE (i don't know the device name if this is the case)? I initially thought I could open the tape device (\\.\Tape0) and then use that handle to access the autoloader with deviceiocontrol.

Does HP have any documentation/examples of using win32 DeviceIoControl with their Autoloader 1/9?
Thanks

Jonathan
3 REPLIES 3
Jan Klier
Respected Contributor

Re: DeviceIoControl() and Autoloader 1/9

There is no official documentation for the problem your trying to solve.

A few tips:

You must open the autoloader device separately. They are independent devices. On Win2K/XP you must use the Changer device to open the device for all recognized libraries. On NT or on Win2K/XP with unrecognized libraries you must use the PhysicalDevice to open the device with the OpenFile call.

You may have to query the HBA information to obtain a list of available devices and to find out which index to use on the device.

The best resource for information on how to program this is the Microsoft MSDN library.
Jonathan Wiebe
New Member

Re: DeviceIoControl() and Autoloader 1/9

Thanks for the tips.

Can you also give help on determining the name of the device to use in the open call. Typically the device names are \\.\c: or \\.\Tape0, but I don't know the device name of the autoloader (and can't find it on MSDN). I am not very familiar with SCSI devices. Is there something like \\.\SCSI0?

Where can I find the device name?

Any help is greatly appreciated, thanks.

Jonathan
Jan Klier
Respected Contributor

Re: DeviceIoControl() and Autoloader 1/9

Valid names are:

\\.\PhysicalDrive0 (...)
\\.\Tape0 (...)
\\.\Changer0 (...)
\\.\SCSI0 (...)