Implementing the Verastream
Visual Basic ActiveX DLL

The Verastream Visual Basic ActiveX DLL provides COM programmers the ability to access host data and functionality.

 

Visual Basic ActiveX DLL Setup

Prior to using the Verastream Visual Basic ActiveX DLL for a production application:

  1. If necessary, rebuild the Visual Basic ActiveX DLL project to access the model on the production server:
    1. In Web Builder, open the Project Properties dialog box for the project.
    2. In the Project Properties dialog box, enter the correct server name.
    3. Click Build to regenerate the Visual Basic ActiveX DLL using the production server name.
  2. Add the project as a reference in Visual Studio Visual Basic. The <ProjectName>.dll is located in the <VHI install folder>\projects\<ProjectName>\activexdll\bin folder.

 

Visual Basic ActiveX DLL Code Example

This example illustrates how to use a Web Builder generated Visual Basic ActiveX DLL. The example uses a project named CICSAccts_ActiveX, which generated a Visual Basic ActiveX DLL for the CICSAccts model. The GetAccount procedure takes an account number as an input parameter and returns account information.

 

// Create an object to represent the session
Dim session as CICSAccts_ActiveXSession
Set session = New CICSAccts_ActiveXSession

// Create an object to hold the filter values
Dim filters As GetAccountFilters
Set filters = New GetAccountFilters

// Initialize the filters with the values you want to pass to the host
filters.AcctNum = 31415;

// Call the procedure on the session, passing in the filters
Dim records As Collection
Set records = session.GetAccount(filters)

// Access the data set and process through them
Dim i
For i = 1 To records.Count
Set record = records(i)
Print record.AcctNum
Print record.LastName
//...
Next

 

 

 

 

  Attachmate