|
-
Aug 12th, 2000, 11:14 AM
#1
Thread Starter
Hyperactive Member
If i have 2 cd drives one is a burner, and one is a pos! how can i check to see which one has a cd in it, or what cd, or eject them and stuff like that?
-
Aug 12th, 2000, 11:31 AM
#2
To open and close the CD drive
Code:
Private 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 cmdOpen_Click()
'Open the CD Drive
mciSendString "set CDAudio door open", 0, 127, 0
End Sub
Private Sub cmdClose_Click()
'Close the CD Drive
mciSendString "set CDAudio door closed", 0, 127, 0
End Sub
-
Aug 12th, 2000, 04:03 PM
#3
Monday Morning Lunatic
Take a look at the platform SDK: Base Services->Hardware->Device Input and Output->Device Input and Output Reference->Device Input and Output Control Codes->IOCTL_STORAGE_CHECK_VERIFY.
This is untested, but is a possibility to see if it has a CD loaded or not.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|