Discussion:
STORAGE_MEDIA_TYPE?
(too old to reply)
S. Heck
2005-01-13 16:27:07 UTC
Permalink
Looking for a way to get available STORAGE_MEDIA_TYPE (s) for a tape drive.
Is there a Win32 API that returns this information?

Thanks!
Marc Reinig
2005-01-14 04:33:12 UTC
Permalink
DeviceIoControl using IOCTL_STORAGE_GET_MEDIA_TYPES_EX.

Marc Reinig
System Solutions
Post by S. Heck
Looking for a way to get available STORAGE_MEDIA_TYPE (s) for a tape drive.
Is there a Win32 API that returns this information?
Thanks!
S. Heck
2005-01-14 10:19:01 UTC
Permalink
Hello Marc,

Thank you for this information. I 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). Any assistance you can give me
would be greatly appreciated.

Thanks!

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;
Post by Marc Reinig
DeviceIoControl using IOCTL_STORAGE_GET_MEDIA_TYPES_EX.
Marc Reinig
System Solutions
Post by S. Heck
Looking for a way to get available STORAGE_MEDIA_TYPE (s) for a tape drive.
Is there a Win32 API that returns this information?
Thanks!
Loading...