Thread: eject removable media

  1. #1
    Android geek@02's Avatar
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    470

    eject removable media

    hi,

    could anyone please point out how to eject the cd drive programatically?

    thanx.
    GameJolt: https://gamejolt.com/@KasunL
    Game Development Youtube:
    https://is.gd/XyhYoP
    Amateur IT Blog: http://everything-geeky.blogspot.com/



    (and, sorry for my amateur English)

  2. #2
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    Try:
    Code:
    mciSendString("open cdaudio alias cd1", 0, 0, 0);
    mciSendString("set cd1 door open wait", 0, 0, 0);

  3. #3
    C++ Enthusiast jmd15's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    532
    Remember you must include mmsystem.h. You also need to link the winmm library. To do this in Dev-C++ Go to options>>Compiler options>>Add the following commands when calling compiler(check the box)>>and in that edit box enter -lwinmm. Then it should work.
    Trinity: "Neo... nobody has ever done this before."
    Neo: "That's why it's going to work."
    c9915ec6c1f3b876ddf38514adbb94f0

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Speculative media
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 07-17-2008, 10:06 PM
  2. Media Centre Coursework.
    By dac in forum C++ Programming
    Replies: 2
    Last Post: 06-20-2006, 07:11 PM
  3. uninstalling windows media player 10
    By MisterSako in forum Tech Board
    Replies: 0
    Last Post: 05-27-2006, 11:53 AM
  4. Media Player
    By Korn1699 in forum Tech Board
    Replies: 18
    Last Post: 11-13-2003, 07:46 AM
  5. Codec Bitrates?
    By gvector1 in forum C# Programming
    Replies: 2
    Last Post: 06-16-2003, 08:39 AM