研发埠
标题:
在程序中利用API函数如何打开和关闭光驱门?
[打印本页]
作者:
徐欣
时间:
2013-7-2 13:21
标题:
在程序中利用API函数如何打开和关闭光驱门?
作者:
淡写轻描
时间:
2013-7-2 13:25
*API函数声明如下
rivate 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注释:调用时的代码如下Dim Ret As LongDim RetStr As String注释:打开光驱门Ret = mciSendString("set CDAudio door open", RetStr, 0, 0)注释:关闭光驱门Ret = mciSendString("set CDAudio door closed", RetStr, 0, 0)
欢迎光临 研发埠 (http://bbs.yanfabu.com/)
Powered by Discuz! X3.2