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. Displaying a list of CD/DVD drives

Displaying a list of CD/DVD drives

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
6 Posts 5 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
    Dev578
    wrote on last edited by
    #1

    I am using MFC, how would I go about finding and displaying all of the CD/DVD drives of the users computer? I have been looking around for articles, and have not found anything yet. Any help is appreciated. -Dev578

    M D M 3 Replies Last reply
    0
    • D Dev578

      I am using MFC, how would I go about finding and displaying all of the CD/DVD drives of the users computer? I have been looking around for articles, and have not found anything yet. Any help is appreciated. -Dev578

      M Offline
      M Offline
      mmica
      wrote on last edited by
      #2

      Take a look at _getdrives() and GetDriveType() in MSDN. There is also an example.

      D 1 Reply Last reply
      0
      • D Dev578

        I am using MFC, how would I go about finding and displaying all of the CD/DVD drives of the users computer? I have been looking around for articles, and have not found anything yet. Any help is appreciated. -Dev578

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        Have you seen the Enumdisk1 sample (article Q264203) on MSDN? It uses the Setup class GUID_DEVCLASS_DISKDRIVE GUID (4D36E967-E325-11CE-BFC1-08002BE10318 I think) to enumerate all the disk devices that are installed in the system.


        "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

        1 Reply Last reply
        0
        • M mmica

          Take a look at _getdrives() and GetDriveType() in MSDN. There is also an example.

          D Offline
          D Offline
          David Crow
          wrote on last edited by
          #4

          mmica wrote: Take a look at _getdrives()... This does not sound like a valid function. Are you sure it exists?


          "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

          P 1 Reply Last reply
          0
          • D David Crow

            mmica wrote: Take a look at _getdrives()... This does not sound like a valid function. Are you sure it exists?


            "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

            P Offline
            P Offline
            Prakash Nadar
            wrote on last edited by
            #5

            Yeah it does, many microsoft C api/functions starts with _ for some compatiblity issue.


            Interviewer (me) : "Did you install Linux all my yourself?" Candidate : "Yes i installed Linux all my yourself."

            1 Reply Last reply
            0
            • D Dev578

              I am using MFC, how would I go about finding and displaying all of the CD/DVD drives of the users computer? I have been looking around for articles, and have not found anything yet. Any help is appreciated. -Dev578

              M Offline
              M Offline
              Michael Dunn
              wrote on last edited by
              #6

              GetLogicalDrives() will tell you which drive letters exist on the system. Call GetDriveType() on each one and look for a return of DRIVE_CDROM. --Mike-- Personal stuff:: Ericahist | Homepage Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ ---- Kosh reminded me of some of the prima-donna programmers I've worked with. Knew everything but when you asked them a question; never gave you a straight answer.   -- Michael P. Butler in the Lounge

              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