IOCTL_STORAGE_GET_MEDIA_TYPES_EX



Today's quiz.

Q1. If a hard drive is connected through a USB-to-IDE adapter using Microsoft's driver stack for USB2 and hard drives, then does IOCTL_STORAGE_GET_MEDIA_TYPES_EX succeed or does it fail with GetLastError() set to 1 (approximate translation: function is making a mistake)?

A1. Yes. In fact it is so reliable today that we could make a randomizing device by taping the hard drives to each other, flipping them like a coin, and connect whichever drive lands on top. If the Fujitsu drive connects then IOCTL_STORAGE_GET_MEDIA_TYPES_EX succeeds but if the Hitachi drive connects then IOCTL_STORAGE_GET_MEDIA_TYPES_EX fails.

Q2. If a hard drive is connected through a USB-to-IDE adapter using Microsoft's driver stack for USB2 and hard drives, then does IOCTL_STORAGE_GET_MEDIA_TYPES (no EX) succeed or does it fail with GetLastError() set to 50 (approximate translation: this request is not supported)?

A2. Not sure. The reason is that if IOCTL_STORAGE_GET_MEDIA_TYPES_EX succeeds then I neglect to call IOCTL_STORAGE_GET_MEDIA_TYPES (no EX). However, with the Hitachi drive, IOCTL_STORAGE_GET_MEDIA_TYPES (no EX) always fails.

Q3. If a hard drive is connected through a USB-to-IDE adapter using Microsoft's driver stack for USB1.1 and hard drives because Microsoft's driver for USB2 randomly decided that it didn't want to work this time, then do IOCTL_STORAGE_GET_MEDIA_TYPES_EX and IOCTL_STORAGE_GET_MEDIA_TYPES (no EX) succeed or fail?

A3. Oops this one has a reliable answer, at least today. In this situation they always fail, at least today.

Q4. Why?

.



Relevant Pages

  • Re: IOCTL_STORAGE_GET_MEDIA_TYPES_EX
    ... the same driver controls a 1.1 or 2.0 connected mass storage device. ... If a hard drive is connected through a USB-to-IDE adapter using Microsoft's driver stack for USB2 and hard drives, then does IOCTL_STORAGE_GET_MEDIA_TYPES_EX succeed or does it fail with GetLastErrorset to 1 ... The reason is that if IOCTL_STORAGE_GET_MEDIA_TYPES_EX succeeds then I neglect to call IOCTL_STORAGE_GET_MEDIA_TYPES. ...
    (microsoft.public.development.device.drivers)
  • Re: IOCTL_STORAGE_GET_MEDIA_TYPES_EX
    ... I do not know the specifics to your answers, i am just pointing out that the usb mass storage driver relies on the underlying hw for the information it reports. ... and some hard drives report that they can't handle any type of media at all? ... If a hard drive is connected through a USB-to-IDE adapter using Microsoft's driver stack for USB2 and hard drives, then does IOCTL_STORAGE_GET_MEDIA_TYPES_EX succeed or does it fail with GetLastErrorset to 1 ... If the Fujitsu drive connects then IOCTL_STORAGE_GET_MEDIA_TYPES_EX succeeds but if the Hitachi drive connects then IOCTL_STORAGE_GET_MEDIA_TYPES_EX fails. ...
    (microsoft.public.development.device.drivers)
  • Re: IOCTL_STORAGE_GET_MEDIA_TYPES_EX
    ... Microsoft's driver stack for USB2 and hard drives, then does IOCTL_STORAGE_GET_MEDIA_TYPES_EX succeed or does it fail with ... and if they both fail then my third attempt will assume that the device had better be a hard disk. ...
    (microsoft.public.development.device.drivers)
  • Re: Home Folder
    ... > such as cdrom/DVD disks as hard drives DO fail. ... > are using EFS to encrypt files in XP Pro you MUST backup your EFS ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Seagate Drives
    ... that are about to fail." ... The only way to be sure things on a hard drive are "safe" is a RAID system, where if one disk fails, the data can be rebuilt. ... We store a *lot* of data at work, all on RAID5 disk arrays. ... You can essentially back up 4 hard drives onto 1.... ...
    (rec.music.gdead)