Liberty BASIC Community Forum
« Open or close CD-ROM Drive »

Welcome Guest. Please Login or Register.
Sep 19th, 2017, 9:09pm


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Open or close CD-ROM Drive  (Read 548 times)
RyanJ
Full Member
ImageImageImage


member is offline

Avatar

Hacker and new to Liberty Basic


Homepage PM

Gender: Male
Posts: 157
xx Open or close CD-ROM Drive
« Thread started on: Jan 27th, 2005, 3:04pm »

Well, I was bored so I desided to do some experiments with APIs (Should have some more soon) anyway, this code accepts a single perameter "open" or "close" altohough there is a slight delay when closing becaust the computer is reading the CD for the autorun INI file.

Code:
Function OpenCloseCDDoor$(OpenClose$)
    Select Case Lower$(OpenClose$)
        Case "open"
            CallDll #winmm, "mciSendStringA",_
                "set Cdaudio door open" As Ptr,_
                 "" As Ptr,_
                 127 As Long, _
                 0 As Long,_
                 Ret As Long
        Case "close"
            CallDll #winmm, "mciSendStringA",_
                "set Cdaudio door closed" As Ptr,_
                 "" As Ptr,_
                 127 As Long, _
                 0 As Long,_
                 Ret As Long
    End Select
End Function
 


Hope you like it :)

RyanJ
« Last Edit: Jan 27th, 2005, 3:11pm by RyanJ » User IP Logged

RyanJ (Ryan Jones)

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls