Is there a tool available that will display the STORAGE_MEDIA_TYPE (s)
available for a specific device ( a tape drive)? If not can this
information be accessed via a Win32 API?

Thanks!

Re: STORAGE_MEDIA_TYPE? by cristalink

cristalink
Thu Jan 13 13:12:05 CST 2005

IOCTL_STORAGE_GET_MEDIA_TYPES_EX
--
http://www.firestreamer.com - NTBackup to DVD and DV


"S. Heck" <SHeck@discussions.microsoft.com> wrote in message
news:95A3A5C9-43B1-467E-8DE1-57B55D377C9D@microsoft.com...
> Is there a tool available that will display the STORAGE_MEDIA_TYPE (s)
> available for a specific device ( a tape drive)? If not can this
> information be accessed via a Win32 API?
>
> Thanks!
>



Re: STORAGE_MEDIA_TYPE? by SHeck

SHeck
Fri Jan 14 04:17:03 CST 2005

Thank you for this information. I am tried this but I am having problems
accessing DEVICE_MEDIA_INFO MediaInfo[1]. I can access DeviceType and
MediaInfoCount with the following code but need help with accessing
DEVICE_MEDIA_INFO MediaInfo[1] (see below).

PGET_MEDIA_TYPES mediaTypes;
BOOL status = 0;
UCHAR buffer[2048];
ULONG returned;

status = DeviceIoControl(hDevice,
IOCTL_STORAGE_GET_MEDIA_TYPES_EX,
NULL,
0,
buffer,
sizeof(buffer),
&returned,
FALSE);


mediaTypes = (PGET_MEDIA_TYPES) buffer;

mediaTypes->DeviceType;

mediaTypes->MediaInfoCount;

mediaTypes->DEVICE_MEDIA_INFO MediaInfo[1] ????

return mediaTypes->DeviceType;

return mediaTypes->MediaInfoCount;

Thanks!

"cristalink" wrote:

> IOCTL_STORAGE_GET_MEDIA_TYPES_EX
> --
> http://www.firestreamer.com - NTBackup to DVD and DV
>
>
> "S. Heck" <SHeck@discussions.microsoft.com> wrote in message
> news:95A3A5C9-43B1-467E-8DE1-57B55D377C9D@microsoft.com...
> > Is there a tool available that will display the STORAGE_MEDIA_TYPE (s)
> > available for a specific device ( a tape drive)? If not can this
> > information be accessed via a Win32 API?
> >
> > Thanks!
> >
>
>
>

Re: STORAGE_MEDIA_TYPE? by Peter

Peter
Fri Jan 14 09:51:05 CST 2005

i think all the ????'s are the problem :)

Can you better explain the problem you're having? mediaTypes->MediaInfo[n]
where n is < MediaInfoCount (and you've allocated a big enough buffer)
should work just fine.

You might want to check the value of returned to be sure that it can account
for MediaInfoCount entries in the array. This I/O control might return the
number of available count entries rather than the number that were actually
returned if you provide a small buffer.

-p

--
This posting is provided "AS IS" with no warranties, and confers no rights.
"S. Heck" <SHeck@discussions.microsoft.com> wrote in message
news:28D7D547-904E-417B-9A22-AB62CC6A3250@microsoft.com...
> Thank you for this information. I am tried this but I am having problems
> accessing DEVICE_MEDIA_INFO MediaInfo[1]. I can access DeviceType and
> MediaInfoCount with the following code but need help with accessing
> DEVICE_MEDIA_INFO MediaInfo[1] (see below).
>
> PGET_MEDIA_TYPES mediaTypes;
> BOOL status = 0;
> UCHAR buffer[2048];
> ULONG returned;
>
> status = DeviceIoControl(hDevice,
> IOCTL_STORAGE_GET_MEDIA_TYPES_EX,
> NULL,
> 0,
> buffer,
> sizeof(buffer),
> &returned,
> FALSE);
>
>
> mediaTypes = (PGET_MEDIA_TYPES) buffer;
>
> mediaTypes->DeviceType;
>
> mediaTypes->MediaInfoCount;
>
> mediaTypes->DEVICE_MEDIA_INFO MediaInfo[1] ????
>
> return mediaTypes->DeviceType;
>
> return mediaTypes->MediaInfoCount;
>
> Thanks!
>
> "cristalink" wrote:
>
>> IOCTL_STORAGE_GET_MEDIA_TYPES_EX
>> --
>> http://www.firestreamer.com - NTBackup to DVD and DV
>>
>>
>> "S. Heck" <SHeck@discussions.microsoft.com> wrote in message
>> news:95A3A5C9-43B1-467E-8DE1-57B55D377C9D@microsoft.com...
>> > Is there a tool available that will display the STORAGE_MEDIA_TYPE (s)
>> > available for a specific device ( a tape drive)? If not can this
>> > information be accessed via a Win32 API?
>> >
>> > Thanks!
>> >
>>
>>
>>



Re: STORAGE_MEDIA_TYPE? by cristalink

cristalink
Fri Jan 14 23:23:14 CST 2005

You may want to have a look at DDK\src\storage\class\tape and
DDK\3790\src\storage\tape, where this IOCTL is handled.
--
http://www.firestreamer.com - NTBackup to DVD and DV


"S. Heck" <SHeck@discussions.microsoft.com> wrote in message
news:28D7D547-904E-417B-9A22-AB62CC6A3250@microsoft.com...
> Thank you for this information. I am tried this but I am having problems
> accessing DEVICE_MEDIA_INFO MediaInfo[1]. I can access DeviceType and
> MediaInfoCount with the following code but need help with accessing
> DEVICE_MEDIA_INFO MediaInfo[1] (see below).
>
> PGET_MEDIA_TYPES mediaTypes;
> BOOL status = 0;
> UCHAR buffer[2048];
> ULONG returned;
>
> status = DeviceIoControl(hDevice,
> IOCTL_STORAGE_GET_MEDIA_TYPES_EX,
> NULL,
> 0,
> buffer,
> sizeof(buffer),
> &returned,
> FALSE);
>
>
> mediaTypes = (PGET_MEDIA_TYPES) buffer;
>
> mediaTypes->DeviceType;
>
> mediaTypes->MediaInfoCount;
>
> mediaTypes->DEVICE_MEDIA_INFO MediaInfo[1] ????
>
> return mediaTypes->DeviceType;
>
> return mediaTypes->MediaInfoCount;
>
> Thanks!
>
> "cristalink" wrote:
>
> > IOCTL_STORAGE_GET_MEDIA_TYPES_EX
> > --
> > http://www.firestreamer.com - NTBackup to DVD and DV
> >
> >
> > "S. Heck" <SHeck@discussions.microsoft.com> wrote in message
> > news:95A3A5C9-43B1-467E-8DE1-57B55D377C9D@microsoft.com...
> > > Is there a tool available that will display the STORAGE_MEDIA_TYPE (s)
> > > available for a specific device ( a tape drive)? If not can this
> > > information be accessed via a Win32 API?
> > >
> > > Thanks!
> > >
> >
> >
> >