Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Hardware & Devices
  4. Disk drive identification - compact flash vs. CFast

Disk drive identification - compact flash vs. CFast

Scheduled Pinned Locked Moved Hardware & Devices
visual-studioadobehelpquestion
5 Posts 3 Posters 7 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    charlieg
    wrote on last edited by
    #1

    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

    L K 2 Replies Last reply
    0
    • C charlieg

      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

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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

      C 1 Reply Last reply
      0
      • L Lost User

        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

        C Offline
        C Offline
        charlieg
        wrote on last edited by
        #3

        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

        L 1 Reply Last reply
        0
        • C charlieg

          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

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          An "empty" drive obviously wouldn't be a "boot drive". Perhaps in "phase 1", one only backs up to "empty drives". I could go on.

          "(I) am amazed to see myself here rather than there ... now rather than then". ― Blaise Pascal

          1 Reply Last reply
          0
          • C charlieg

            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

            K Offline
            K Offline
            keptop3
            wrote on last edited by
            #5

            Following this

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups