三恨老家发现的 搬过来
_CdTray("g:","Open") ;打开光驱
_CdTray("g:","CLosed") ;关闭光驱
Func _CdTray($Drive,$flags)
DllCall("winmm.dll", "int", "mciSendString", "str", "Open " & $Drive & " Alias Drive" & $Drive & " Type CDAudio", "int", 0, "int", 0, "int", 0)
Switch $flags
Case "Open"
DllCall("winmm.dll", "int", "mciSendString", "str", "Set Drive" & $Drive & " Door Open", "int", 0, "int", 0, "int", 0)
Case "CLosed"
DllCall("winmm.dll", "int", "mciSendString", "str", "Set Drive" & $Drive & " Door Closed", "int", 0, "int", 0, "int", 0)
EndSwitch
EndFunc
[ 本帖最后由 sxd 于 2008-12-28 18:21 编辑 ] |