Re: IOCTL_STORAGE_GET_MEDIA_TYPES_EX



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@xxxxxxxxxxxxxxxxxxxxxxx
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: LinkSys Media Center Extender disconnection, error code 000100
    ... Dynamic Disks are the problem here. ... Have you added any hard drives to your PC since you bought it, ... the media center pc the following event are logs. ... Barb Bowman ...
    (microsoft.public.windows.mediacenter)
  • Re: RAID 0 OR NOT? or iSCSI
    ... > RAID 0 configuration. ... > backup and use the other for audio/video files only. ... media is way cheap enough to use for backup. ... Hard drives aren't proper backup devices. ...
    (rec.audio.pro)
  • What music and art files upload ?
    ... Here in Canada we are slow to respond to Copyright and general usage rights for copying media to our PCs. ... We are a strange lot here in Canuck land; we have laws that allow us to download music with P2P and online retailers, but restrictions for copying do not legalize using hard drives or MP3 players for some personal use music or video file sharing. ... Copies from records, tapes, and CDs to each other are OK as long as the PC/MP3 player is left out of the loop. ...
    (microsoft.public.windowsmedia.player)
  • Re: LinkSys Media Center Extender disconnection, error code 000100
    ... What difference does being NTFS or Dynamic make? ... Have you added any hard drives to your PC since you bought it, ... the media center pc the following event are logs. ... Barb Bowman ...
    (microsoft.public.windows.mediacenter)
  • Re: Switch XP from one drive to another
    ... > programs to the 10 gig drive and my media and databases to ... Start storing your media files on the 20g if they are Fat32. ... older hard drives this type of intense disk activity can ...
    (microsoft.public.windowsxp.general)