The API calls have exactly the same name in Visual Basic API as they have in the C API defined earlier. When passing arguments use the following equivalences. Note that pointers are handled by VB automatically using ByRef declarations.
C | VB |
---|---|
int | Long |
CHAND | Long |
KHAND | Long |
ROWID | Long |
Row and key buffers must be declared as byte arrays and referenced by their zero'th element e.g.
DIM rc As Long Dim recno As Long Dim h As Long Dim path As Long Dim RecBuf(400) As Byte Dim RecBuf(MAXKEYLEN) As Byte rc = KISAMReadNext(h,path,RecBuf(0),key(0),recno)
The buffers must be declared large enough. However the column buffer used by KISAMGetString should be declared as a fixed length string. For instance
Dim ColBuf As String *40 rc = KISAMGetString(h,RecBuf(0),"SURNAME",0,ColBuf,40)