Configure Project#

The examples were made and tested by using Visual Studio Professional 2017. The usage with other Visual Studio versions requires maybe modifications. In this example the 64-bit DLL is used.

An already defined project can be found by following:

C:\<sofistik_installation>\2024\SOFiSTiK 2024\interfaces\examples\vb.net\connect_to_cdb

In the code examples, next functions are defined:

  • sof_cdb_init()

  • sof_cdb_get()

  • sof_cdb_close()

  • sof_cdb_flush()

  • sof_cdb_status()

Set up DLL functions#

Below you can find the description how to define the DLL functions.
All functions are described in the CDBASE.CHM file.
Imports System.Runtime.InteropServices

Module main
   'In this example, 64bit DLLs are used
   Public Declare Function sof_cdb_init Lib "sof_cdb_w-2024.dll" Alias "VB_sof_cdb_init" (
      ByVal name As String,
      ByVal InitType As Integer
   ) As Integer

   Public Declare Function sof_cdb_status Lib "sof_cdb_w-2024.dll" Alias "VB_sof_cdb_status" (
      ByVal Index As Integer
   ) As Integer

   Public Declare Function sof_cdb_close Lib "sof_cdb_w-2024.dll" Alias "VB_sof_cdb_close" (
      ByVal Index As Integer
   ) As Integer

   ' ...