|
|
|
Click here to copy the following block | <System.Runtime.InteropServices.DllImport("winmm.dll")> Shared Function _ mciSendString(ByVal lpstrCommand As String, ByVal lpstrReturnString As _ String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As _ Integer End Function
Sub ExecuteMCICommand(ByVal commandString As String, ByVal deviceAlreadyOpened _ As Boolean) Dim returnCode As Integer = mciSendString(commandString, vbNullString, 0, 0)
If returnCode <> 0 Then
If deviceAlreadyOpened Then commandString = "close AVIFile" mciSendString(commandString, vbNullString, 0, 0) End If
Throw New MCICommandException(returnCode)
End If End Sub
Class MCICommandException Inherits Exception
Public Sub New(ByVal errorCode As Integer) MyBase.New(GetMCIErrorString(errorCode)) End Sub End Class |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|