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. drive list, drive type and drive name

drive list, drive type and drive name

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++sysadminhelptutorial
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.
  • G Offline
    G Offline
    Guy Lecomte
    wrote on last edited by
    #1

    hello, in my current project, I need to store the original file path of files. But they can come from many unit types : FD, local HD, network HD, CD writer, DVD rom etc.... So, for a given computer (the local machine !)I need to know : - The drive list - the type of each drive - the name of each unit (HD name, CD ROM name if one is inserted in the CD Reader..) I did not find out how to do that in VC++, is there anybody out there who can help me , please ?:confused: You guys, who are so smart I've a new question : how to know if a unit is a CD Writer, a DVD writer ? Thank you very much for the so numerous and efficient answer ! :-D :-D (hope make me live !) Best regards Guy LECOMTE

    T A 2 Replies Last reply
    0
    • G Guy Lecomte

      hello, in my current project, I need to store the original file path of files. But they can come from many unit types : FD, local HD, network HD, CD writer, DVD rom etc.... So, for a given computer (the local machine !)I need to know : - The drive list - the type of each drive - the name of each unit (HD name, CD ROM name if one is inserted in the CD Reader..) I did not find out how to do that in VC++, is there anybody out there who can help me , please ?:confused: You guys, who are so smart I've a new question : how to know if a unit is a CD Writer, a DVD writer ? Thank you very much for the so numerous and efficient answer ! :-D :-D (hope make me live !) Best regards Guy LECOMTE

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      For a start, check GetLogicalDriveStrings, GetDriveType and GetVolumeInformation. Tomasz Sowinski -- http://www.shooltz.com

      1 Reply Last reply
      0
      • G Guy Lecomte

        hello, in my current project, I need to store the original file path of files. But they can come from many unit types : FD, local HD, network HD, CD writer, DVD rom etc.... So, for a given computer (the local machine !)I need to know : - The drive list - the type of each drive - the name of each unit (HD name, CD ROM name if one is inserted in the CD Reader..) I did not find out how to do that in VC++, is there anybody out there who can help me , please ?:confused: You guys, who are so smart I've a new question : how to know if a unit is a CD Writer, a DVD writer ? Thank you very much for the so numerous and efficient answer ! :-D :-D (hope make me live !) Best regards Guy LECOMTE

        A Offline
        A Offline
        Atul Dharne
        wrote on last edited by
        #3

        GetLogicalDrives -- returns a bitmask representing the currently available disk drives. GetLogicalDriveStrings -- fills a buffer with strings that specify valid drives in the system. GetDriveType -- determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive. The Win32_CDROMDrive WMI(Windows Management Instrumentation ) class represents a CD-ROM drive on a Win32 computer system. Check the MediaType property whose values are Values are: "Random Access" "Supports Writing" "Removable Media" "CD-ROM" Atul :suss: Don't they know that java is slow. :suss:

        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