Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to determine what drives (volumes) show up in "Safely Remove Hardware" dialog?
    primarykey
    data
    text
    <p>I have an application that watches for file system events. This requires a permanently open handle to the target volumes. This is fine for things like the system boot drive and other fixed devices but very undesirable if we're dealing with volumes hosted on removable devices such as eSATA, USB, Firewire, iSCSI, etc, as the user may want to unplug these at any time but the open handle will prevent "Safely Remove Hardware" from succeeding.</p> <p>Ideally I'd like to prevent my application from latching onto any volume whose parent may appear in "Safely Remove Hardware" as the default. The problem is, there doesn't seem to be a documented way of determining what devices show up there and what devices don't. Am I missing something? Does anyone have a lead?</p> <p>Note that it's possible to query a device's bus type and this almost gets the job done for me:</p> <pre><code>typedef enum _STORAGE_BUS_TYPE { BusTypeUnknown = 0x00, BusTypeScsi = 0x1, BusTypeAtapi = 0x2, BusTypeAta = 0x3, BusType1394 = 0x4, BusTypeSsa = 0x5, BusTypeFibre = 0x6, BusTypeUsb = 0x7, BusTypeRAID = 0x8, BusTypeiScsi = 0x9, BusTypeSas = 0xA, BusTypeSata = 0xB, BusTypeSd = 0xC, BusTypeMmc = 0xD, BusTypeVirtual = 0xE, BusTypeFileBackedVirtual = 0xF, BusTypeMax = 0x10, BusTypeMaxReserved = 0x7F } STORAGE_BUS_TYPE, *PSTORAGE_BUS_TYPE; </code></pre> <p>However the IOCTL returns BusTypeSata for both SATA and eSATA - yet the OS recognizes the latter as something that has to be shown in the "Safely Remove" dialog.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload