Disk drive identification - compact flash vs. CFast
-
I have an app that needs to be able to write and image to a removable device. This usually means a Compact Flash or a CFast card. Up to this point, the application restricted drive selection to only removable drives - GetDeviceInfo returned this information reliably. Enter CFast cards which seem to be mounted as a SCSI device, and Windows sees them as a generic disk drive or removable, depending on the whims of the CFast card reader. I've been perusing system call after system call, disk utilities, and what not, and I have not yet found a system call that will return to me any ID information from the removable disk. Ideas?
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
-
I have an app that needs to be able to write and image to a removable device. This usually means a Compact Flash or a CFast card. Up to this point, the application restricted drive selection to only removable drives - GetDeviceInfo returned this information reliably. Enter CFast cards which seem to be mounted as a SCSI device, and Windows sees them as a generic disk drive or removable, depending on the whims of the CFast card reader. I've been perusing system call after system call, disk utilities, and what not, and I have not yet found a system call that will return to me any ID information from the removable disk. Ideas?
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Can you not "infer" (somewhat) from the file format, total space, name and / or drive letter? Even then, don't you give the user the option to make a choice? (i.e. Is this the correct device ... as in "I will erase / overwrite everything"). (This is practically a requirement when dealing with multiple COM ports; i.e. identifying the one to use). Machine learning: note changes from one tally of drives to another.
"(I) am amazed to see myself here rather than there ... now rather than then". ― Blaise Pascal
-
Can you not "infer" (somewhat) from the file format, total space, name and / or drive letter? Even then, don't you give the user the option to make a choice? (i.e. Is this the correct device ... as in "I will erase / overwrite everything"). (This is practically a requirement when dealing with multiple COM ports; i.e. identifying the one to use). Machine learning: note changes from one tally of drives to another.
"(I) am amazed to see myself here rather than there ... now rather than then". ― Blaise Pascal
I can infer, but we're on the paranoid side - we want to avoid a user nuking their boot drive. So, I thought I would just ask. You'd be amazed at the number of times people have actually done this. Even if we ask "Are you sure?" somehow we always get blamed :)
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
-
I can infer, but we're on the paranoid side - we want to avoid a user nuking their boot drive. So, I thought I would just ask. You'd be amazed at the number of times people have actually done this. Even if we ask "Are you sure?" somehow we always get blamed :)
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
-
I have an app that needs to be able to write and image to a removable device. This usually means a Compact Flash or a CFast card. Up to this point, the application restricted drive selection to only removable drives - GetDeviceInfo returned this information reliably. Enter CFast cards which seem to be mounted as a SCSI device, and Windows sees them as a generic disk drive or removable, depending on the whims of the CFast card reader. I've been perusing system call after system call, disk utilities, and what not, and I have not yet found a system call that will return to me any ID information from the removable disk. Ideas?
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759