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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. MCI CD Audio Mount and Eject?

MCI CD Audio Mount and Eject?

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 Posts 2 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.
  • B Offline
    B Offline
    Bryan Anslow
    wrote on last edited by
    #1

    Hi, I have an MCI application that reads/catalogs audio CD's using the CDDB Interface. There are two things I would like to get it to do that it currently does not; 1) Recognise that a CD has been loaded into the drive, so that I do not need to have a menu item to add a new CD. 2) Eject the drive after the information has been cataloged. I know that for 2) there are a couple of KB Articles, Q165721 and Q168180, but I would like a simpler, more universal method, if possible. Many Thanks in advance for any info. Bryan Anslow.

    T 1 Reply Last reply
    0
    • B Bryan Anslow

      Hi, I have an MCI application that reads/catalogs audio CD's using the CDDB Interface. There are two things I would like to get it to do that it currently does not; 1) Recognise that a CD has been loaded into the drive, so that I do not need to have a menu item to add a new CD. 2) Eject the drive after the information has been cataloged. I know that for 2) there are a couple of KB Articles, Q165721 and Q168180, but I would like a simpler, more universal method, if possible. Many Thanks in advance for any info. Bryan Anslow.

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

      Ejecting with MCI is easy. Assuming that you know the drive letter, send the following strings: "open f: type cdaudio alias cdx0" "set cdx0 door open" cdx0 is just a sample alias. Any identifier should work. Tomasz Sowinski -- http://www.shooltz.com

      B 1 Reply Last reply
      0
      • T Tomasz Sowinski

        Ejecting with MCI is easy. Assuming that you know the drive letter, send the following strings: "open f: type cdaudio alias cdx0" "set cdx0 door open" cdx0 is just a sample alias. Any identifier should work. Tomasz Sowinski -- http://www.shooltz.com

        B Offline
        B Offline
        Bryan Anslow
        wrote on last edited by
        #3

        Thanks Tomasz, I use mciSendCommand() everywhere in this prog, so I found this worked; mciSendCommand(_mciDevice, // Eject the CD MCI_SET, MCI_SET_DOOR_OPEN, (DWORD)(LPVOID)&mciSet); also, for finding out when a CD is inserted, I just added a line to my mainframe module (it's an MFC App)like; ON_WM_DEVICECHANGE() and the OnDeviceChange() function can find which device etc., by examining the passed parm, Bryan.

        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