ExecuteMCICommand – Executing a MCI command

ExecuteMCICommand – Executing a MCI command

 Shared Function _    mciSendString(ByVal lpstrCommand As String, ByVal lpstrReturnString As _    String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As _    IntegerEnd Function' helper routine; executes a MCI command ' commandString is the command to execute' deviceAlreadyOpened must be set to true if the caller has already opened the ' deviceSub ExecuteMCICommand(ByVal commandString As String, ByVal deviceAlreadyOpened _    As Boolean)    Dim returnCode As Integer = mciSendString(commandString, vbNullString, 0, 0)    ' if the return code is not 0, an error occurred    If returnCode <> 0 Then        ' close the device if necessary        If deviceAlreadyOpened Then            commandString = "close AVIFile"            mciSendString(commandString, vbNullString, 0, 0)        End If        ' throw a custom exception        Throw New MCICommandException(returnCode)    End IfEnd Sub' helper custom exception' motes: requires the GetMCIErrorString functionClass MCICommandException    Inherits Exception    Public Sub New(ByVal errorCode As Integer)        MyBase.New(GetMCIErrorString(errorCode))    End SubEnd Class

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of