Using seamax with visual basic 6.0 – Impulse 463E User Manual

Page 84

Advertising
background image

© Sealevel Systems, Inc.

- 81 -

SeaI/O User Manual

Using SeaMAX with Visual Basic 6.0

In order to use the SeaMAX library with your Visual Basic program, it will first be
necessary to import the SeaMAX functions using Declare. In each of the example
folders, there exists a file named ‘SeaMAX.bas’ which contains the various type and
function imports.
The following is an example of how to import the various SeaMAX functions into
Visual Basic:


Public Declare Function SeaMaxW32GetCommHandle Lib "CSeaMaxW32.dll" _
(ByVal ptr As Any) As Long

Public Declare Function SeaMaxW32Create Lib "CSeaMaxW32.dll" _
() As Long

Public Declare Function SeaMaxW32Destroy Lib "CSeaMaxW32.dll" _
(ByVal ptr As Any) As Long

Public Declare Function SeaMaxW32Open Lib "CSeaMaxW32.dll" _
(ByVal ptr As Any, _
ByVal portStr As String) As Long

Public Declare Function SeaMaxW32Close Lib "CSeaMaxW32.dll" _
(ByVal ptr As Any) As Long

Public Declare Function SeaMaxW32Read Lib "CSeaMaxW32.dll" _
(ByVal ptr As Any, _
ByVal slaveId As Integer, _
ByVal seaioType As Integer, _
ByVal addressLoc As Integer, _
ByVal addressRange As Integer, _
ByRef readData As Any) As Long

Public Declare Function SeaMaxW32Write Lib "CSeaMaxW32.dll" _
(ByVal ptr As Any, _
ByVal slaveId As Integer, _
ByVal seaioType As Integer, _
ByVal addressLoc As Integer, _
ByVal addressRange As Integer, _
ByRef writeData As Any) As Long

Public Declare Function SeaMaxW32Ioctl Lib "CSeaMaxW32.dll" _
(ByVal ptr As Any, _
ByVal slaveId As Integer, _
ByVal ioctlType As Integer, _
ByRef data As Any) As Long

Advertising