Imports RevisionManager
Imports System.Runtime.InteropServices
Module Example
    Sub Main()
        Dim objApplication As RevisionManager.Application = Nothing
        Dim objInsight As RevisionManager.Insight = Nothing
        Dim aFilesToDelete(0) As String
        Dim NumberOfNotDeletedDocuments As Long
        Dim aListOfNotDeletedDocuments As Object
        Try
            ' Start Revision Manager.
            objApplication = New RevisionManager.Application
            ' Get reference to Insight object.
            objInsight = objApplication.Insight
            aFilesToDelete(0) = "D:\InsightCache\Insight\solidvm\Engineering\PreReleased\PreReleasedDocLib\Summit.par"
            objInsight.DeleteDocumentsFromCache(aFilesToDelete.Length, aFilesToDelete, NumberOfNotDeletedDocuments, aListOfNotDeletedDocuments)
        Catch ex As Exception
            ' Write any errors to console.
            Console.WriteLine(ex.Message)
        Finally
            ' Release COM Objects.
            If Not (objInsight Is Nothing) Then
                Marshal.ReleaseComObject(objInsight)
                objInsight = Nothing
            End If
            If Not (objApplication Is Nothing) Then
                objApplication.Quit()
                Marshal.ReleaseComObject(objApplication)
                objApplication = Nothing
            End If
        End Try
    End Sub
End Module