Guidance
指路人
g.yi.org
Guidance Forums / Reginald Rexx / Problem with CD functions

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Problem with CD functions
#12675
Posted by: Doug Arndt 2009-02-03 07:33:09
I've a script that will launch "Exact Audio Copy"  to rip a CD.
That part is fine, so I wanted to "open" the CD tray before calling this program.

  Say "Open="CdOpenDevice("CDhandle","D")
  Say "Unlock="CdOperation(CDhandle,"UNLOCK")    <-- added this later, no help
  Say "Eject="CdOperation(CDhandle,"EJECT")
  Say "Close="CdCloseDevice(CDhandle)


The Open, Unlock, and Close all return a null value.
The Eject returns "Invalid function"

Also, the CD drive remains locked so I can't manually open the tray, and when Exact Audio Copy kicks off, it reports  "No audio CD in drive"
so the CD functions leave the drive messed up.

Commenting out the above code, EAC runs fine and I can manually open the tray.

So,
  1)  Eject isn't working
  2)  Close isn't releasing (or at least unlocking) the CD drive
Doug
Message2.
#12676
Posted by: Jeff Glatt 2009-02-03 07:41:19
Your CDROM drive doesn't appear to support the IOCTL_STORAGE_EJECT_MEDIA command. I'd try the code on a different drive.
Message3.
#12678
Posted by: PeterJ 2009-02-03 13:54:50
... works fine for me!
Message4.
#12680
Posted by: Doug Arndt 2009-02-04 23:34:59
Is there a way to test if the drive supports that command or not ?
Doing a right click on the drive letter, in explorer, then "eject", that works.
Doug
Message5.
#12681
Posted by: Jeff Glatt 2009-02-05 00:04:51
You're not running this code on Windows 95/98/ME? Those don't support the command.
Message6.
#12682
Posted by: Doug Arndt 2009-02-05 05:44:01
No, this is an XP system.   All other programs, Nero, Exact Audio Copy, Goldwave, Explorer,  have no problem ejecting the tray.
Doug
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥860.00 ·
 
 
¥410.00 ·
 
 
¥288.00 ·
 
 
¥918.00 ·
 
 
¥288.00 ·
 
 
¥264.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0