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. C / C++ / MFC
  4. Opening a drive...need help

Opening a drive...need help

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++adobejsonhelp
3 Posts 3 Posters 0 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.
  • D Offline
    D Offline
    dranne
    wrote on last edited by
    #1

    I am doing direct disk IO on a Compact Flash card (using Win32 CreateFile API) which is connected to the PC via a USB flash reader. This card is mapped to my machine as a "device with removable storage" and has the drive letter H: On some other machine, Windows will map it with some different drive letter (e.g. I, K etc). I don't want to hard code the drive letter H: or K: in my code, rather want to automatically detect that H: or K: is my desired drive. How can this be done? Can anyone help? Pardon me if this is a stupid question as I am new to C++ and Windows programming. Thanks dranne

    T V 2 Replies Last reply
    0
    • D dranne

      I am doing direct disk IO on a Compact Flash card (using Win32 CreateFile API) which is connected to the PC via a USB flash reader. This card is mapped to my machine as a "device with removable storage" and has the drive letter H: On some other machine, Windows will map it with some different drive letter (e.g. I, K etc). I don't want to hard code the drive letter H: or K: in my code, rather want to automatically detect that H: or K: is my desired drive. How can this be done? Can anyone help? Pardon me if this is a stupid question as I am new to C++ and Windows programming. Thanks dranne

      T Offline
      T Offline
      thammadi
      wrote on last edited by
      #2

      Look at following code project article http://www.codeproject.com/w2k/usbdisks.asp?df=100 I hope it helps.

      1 Reply Last reply
      0
      • D dranne

        I am doing direct disk IO on a Compact Flash card (using Win32 CreateFile API) which is connected to the PC via a USB flash reader. This card is mapped to my machine as a "device with removable storage" and has the drive letter H: On some other machine, Windows will map it with some different drive letter (e.g. I, K etc). I don't want to hard code the drive letter H: or K: in my code, rather want to automatically detect that H: or K: is my desired drive. How can this be done? Can anyone help? Pardon me if this is a stupid question as I am new to C++ and Windows programming. Thanks dranne

        V Offline
        V Offline
        vipin_nvk
        wrote on last edited by
        #3

        Is ur Application (which has to perform the disk IO) installed on the PC or on the USB flash reader ? If the Application runs from the PC (rather than from the USB flash drive) is there a posssible scenario of mutliple USB flash drives are connected to the PC and u have to uniquely identify each USB flash drive and perform a different disk IO ? Vipin.

        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