Re: IOCTL_STORAGE_GET_MEDIA_TYPES_EX
- From: "Norman Diamond" <ndiamond@xxxxxxxxxxxxxxxx>
- Date: Wed, 2 Apr 2008 12:38:58 +0900
Do you mean some hard drives report that they can handle a type of media (I didn't investigate further what type of media) and some hard drives report that they can't handle any type of media at all?
Does this mean that I should also refrain from trying IOCTL_STORAGE_GET_MEDIA_TYPES_EX and IOCTL_STORAGE_GET_MEDIA_TYPES on internal hard drives? I should use a different IOCTL first to find out if the device is a hard drive or not, and then proceed to these one or two IOCTLs if the device is other than a hard drive? Which IOCTL is recommended for the first investigation to find out if the device is a hard drive?
"Doron Holan [MSFT]" <doronh@xxxxxxxxxxxxxxxxxxxx> wrote in message news:u$8Y2FHlIHA.484@xxxxxxxxxxxxxxxxxxxxxxx
the same driver controls a 1.1 or 2.0 connected mass storage device. i think the randomness you see is due different bridges that expose the device as a usb device. the driver itself just follows the mass storage spec and returns the data that the drive reports
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Norman Diamond" <ndiamond@xxxxxxxxxxxxxxxx> wrote in message news:ey80n$GlIHA.2268@xxxxxxxxxxxxxxxxxxxxxxxToday'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?
.
- Follow-Ups:
- Re: IOCTL_STORAGE_GET_MEDIA_TYPES_EX
- From: Maxim S. Shatskih
- Re: IOCTL_STORAGE_GET_MEDIA_TYPES_EX
- From: Doron Holan [MSFT]
- Re: IOCTL_STORAGE_GET_MEDIA_TYPES_EX
- References:
- IOCTL_STORAGE_GET_MEDIA_TYPES_EX
- From: Norman Diamond
- Re: IOCTL_STORAGE_GET_MEDIA_TYPES_EX
- From: Doron Holan [MSFT]
- IOCTL_STORAGE_GET_MEDIA_TYPES_EX
- Prev by Date: Re: IOCTL_STORAGE_GET_MEDIA_TYPES_EX
- Next by Date: Re: Upper Filter on COM port?
- Previous by thread: Re: IOCTL_STORAGE_GET_MEDIA_TYPES_EX
- Next by thread: Re: IOCTL_STORAGE_GET_MEDIA_TYPES_EX
- Index(es):
Relevant Pages
|