# Re: 请问如何让CDROM 打开（退片)呢？

Posted by Honey on July 24, 1999 at 23:34:30:

In Reply to: 请问如何让CDROM 打开（退片)呢？ posted by VAIO on July 24, 1999 at 22:10:58:

: 请问如何让CDROM 打开（退片)呢？
先宣告
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
这个API 若在模组宣告得去掉Private
而后使用
mciSendString "set cdaudio door open", vbNullString, 0, 0
便可打开cd的门
要关闭紫要将open改成closed就行了 简单吧

Follow Ups: