17-10-12, 05:14 PM
كاتب الموضوع : AhmedEssawy
كود :
Imports System.Runtime.InteropServices
Imports System.Text
...
Public Shared Sub Main()
Dim result As Integer = mciSendString("set cdaudio door open", Nothing, 0, IntPtr.Zero)
result = mciSendString("set cdaudio door closed", Nothing, 0, IntPtr.Zero)
End Sub
Protected Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal mciCommand As String, ByVal returnValue As StringBuilder, ByVal returnLength As Integer, ByVal callback As IntPtr) As Integer