eject removable media

This is a discussion on eject removable media within the Windows Programming forums, part of the Platform Specific Boards category; hi, could anyone please point out how to eject the cd drive programatically? thanx....

  1. #1
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    385

    eject removable media

    hi,

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

    thanx.
    Some useless programs i've wrote : slprogrammersheaven
    Youtube: http://www.youtube.com/user/geekyzine
    My amature IT Blog: http://everything-geeky.blogspot.com/
    My Flash games: http://flashweed.blogspot.com/

    (and, sorry for my amature 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, 11:06 PM
  2. Media Centre Coursework.
    By dac in forum C++ Programming
    Replies: 2
    Last Post: 06-20-2006, 08:11 PM
  3. uninstalling windows media player 10
    By MisterSako in forum Tech Board
    Replies: 0
    Last Post: 05-27-2006, 12:53 PM
  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, 09:39 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21