use Win32::API; #start up # Win32::API->Import("wsp", "int InitWasp()"); Win32::API->Import("wsp", "int SetOutputs(int a)"); #how functions are called # InitWasp(); SetOutputs(1); #### 'connect to dlls Declare Function InitWasp Lib "wsp.dll" () As Boolean Declare Function SetOutputs Lib "wsp.dll" (ByVal outputs As Integer) As Integer Declare Function ReadInputs Lib "wsp.dll" (ByRef analogue As Integer) As Integer 'how functions are called InitWasp() ' initialize the wasp board for USB comms SetOutputs(8) Dim analogue(4) As Integer Dim x As Double ReadInputs(analogue(0)) x = analogue(1) #### // Header file for use with wsp.dll typedef bool (*Type_InitWasp)(); typedef bool (*Type_ReadInputs)(int *analogue); typedef bool (*Type_SetOutputs)(int digital);