dll that controls cdrom eject

Discussion in 'Windows Desktop Systems' started by iNFERN0, Dec 14, 2001.

  1. iNFERN0

    iNFERN0 Guest

    well my simple problem. is my box is 2-3 meters away from my desk/moniter and everytime i wanna change a cdrom i don't like having to get up off my ass to hit the button......

    and i hate having to go to my computer and right clicking on "eject" on my cdrom.

    so i was wondering if anyone knew the dll or exe that controls the ejecting and also what varibles are needed too.


    ie blablah.dll-cdrom_eject_crap_here

    i wanna make a shortcut out of it then assign it a shortcut key.
     
  2. kruger

    kruger Guest

    Hi, I think I got a tool for your problem.
    I wrote a program some time ago that solves the problem.
    I've only tried it out in win98/NT/2000 but I think it will run in XP too.
    File attached "cdtools.zip"


    Regards


    :DKruger:D
     
  3. Moonacres

    Moonacres Guest

    Interesting though because you will still have to get up to change the CD would you not? :confused:
     
  4. iNFERN0

    iNFERN0 Guest

    i don't have to move that far to get the cd compared to reaching for the button.

    also i can click the eject command on my puter just be4 i reach to get the cd and by the time i get there the cdrom drive will be open (u know how it has that annoying delay that insures the cd has stopped spinning)
     
  5. Moonacres

    Moonacres Guest

    Okay I now understand.
     
  6. Moonacres

    Moonacres Guest

    I tried that tool that Kruger wrote and it works beautifully. If you have not tried it yet you should as it might be what you are looking for.

    Kruger, nice job.
     
  7. kruger

    kruger Guest

    Hi, thanx for trying my app...

    Wrote it after I was tired of doing the eject of my Cd drive manually.
    I also think it's nice that it stays in the systray untill U need it
    Icon is stolen from CloneCD (Sorry Olli)
    Program written in O'Basic, nice script program that can be found at hxxp://www.obasic.com


    :D Kruger :D
     
  8. Lonman

    Lonman Bleh!

    Messages:
    2,642
    Kool tool Kruger. Can I set it up to open more then 1 drive?
     
  9. iNFERN0

    iNFERN0 Guest

    the program is great but it doesn't work if your cdrom drive isn't assigned to what u have it programed as.

    could you possibly post how it ejects the cdrom? its gotta obviously use some sort of dll or something

    cuz then i can make a shortcut using that and assign it a shortcut key
     
  10. kruger

    kruger Guest

    Hi, first to Loneman: the code can't eject anything else than the cd drive that are default!
    I do not know the code for choosing what drive to use, but I can try to get it from someone that got the knowledge.

    The code I got can not help you to create a shortcut to do this!

    Regards

    :D Kruger :D
     
  11. kruger

    kruger Guest

    Visual Basic Script!

    Hi, found a Visual Basic script for ejecting the cdrom door
    It calls for the dll file winmm.dll

    Script below:

    ****
    Option Explicit

    Public Declare Function mciSendString Lib "winmm.dll" _
    Alias "mciSendStringA" _
    (ByVal lpstrCommand As String, _
    ByVal lpstrReturnString As String, _
    ByVal uReturnLength As Long, _
    ByVal hwndCallback As Long) As Long


    Private Sub Command1_Click()

    Call mciSendString("Set CDAudio Door Open Wait", 0&, 0&, 0&)

    End Sub
    '--end block--'

    ****


    Regards


    :D Kruger :D