Click or drag to resize
Using the Connection API in a Visual Basic project

The Meridian Connection API is contained in a dynamic link library (DLL) file named ICMeridianAPI.dll. This DLL is a .NET managed assembly with one class named Connection. Therefore, the complete COM program identifier of the Meridian Connection API is ICMeridianAPI.Connection. The installed location of the DLL file is unimportant.

To reference the component in your Visual Basic project, add the Meridian Connection API to your project with the following steps.

  1. Click Project and then select References.
  2. If the component has already been registered on the computer, you can select it from the list by the name IC Meridian API. Make sure you select the correct component because multiple components exist with similar names. If the component has never been registered on the computer, click Browse and select ICMeridianAPI.dll from the location where you installed the file.

After the Meridian Connection API has been added as a reference to your project, you can create a new instance using the following code.

Example
1Dim AMMConnection as New ICMeridianAPI.Connection

A better way is to create a user-defined class (named ConnectionAPI in the following example) of this component using the following syntax.

Example
 1Option Explicit
 2
 3Private underlyingObject
 4
 5Private Sub Class_Initialize() 
 6    Set underlyingObject = CreateObject("ICMeridianAPI.Connection")
 7End Sub
 8
 9Private Sub Class_Terminate()
10    Call underlyingObject.Dispose
11    Set underlyingObject = Nothing
12End Sub
13
14Public Function SafeObject() As Object
15    Set SafeObject = underlyingObject
16End Function

Then you can create an instance of the class using the following syntax.

Example
1Dim api As New ConnectionAPI 
2Call api.SafeObject.ShowWizard(vaultId, documentId)
Note Note

This example is very similar to, but different from, the example shown in Using the Connection API in VBScript.

The Meridian Connection API is a client-side DLL and requires the Meridian Enterprise shared components to be installed on the computer to function. The components can be installed as an independent part of any Meridian Enterprise installation.