'/*-------------------------------------------------------------------- *
'*                                                                      *
'*   3333   CCCC      CCCC  OOOO  N     N  CCCC  EEEEE  PPPP  TTTTTTT   *
'*       3 C         C     O    O NN    N C      E      P   P    T      *
'*       3 C         C     O    O N N   N C      E      P   P    T      *
'*   3333  C         C     O    O N  N  N C      EEEE   PPPP     T      *
'*       3 C         C     O    O N   N N C      E      P        T      *
'*       3 C         C     O    O N    NN C      E      P        T      *
'*   3333   CCCC      CCCC  OOOO  N     N  CCCC  EEEEE  P        T      *
'*                                                                      *
'*     UNITE D'INTERFACE POUR DLL/Win32 Module TC/USB-18A               *
'*                                                                      *
'*  Wrapper VB.NET pour utilsation du module TCUSB18A                   *
'*  Microsoft Visual Basic 2010 Express                                 *
'*                                                                      *    
'*                                                                      *
'* (c)2014 3C CONCEPT S.A.S                							    *	
'*  V1.00 : MB : 31/10/2014 :creation version VB.NET					*
'* -------------------------------------------------------------------- *
'*/



Imports System.Runtime.InteropServices
Module TCUSB18A
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_Refresh(Num_module As Integer) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_Open(NModule As Integer, ByRef NumSerie As UInt32) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_OpenN(NModule As Integer, ByRef NumSerie As UInt32) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_Close(NModule As Integer) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_Input(NModule As Integer, ByRef Data As UInt32) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_Output(NModule As Integer, Data As Byte) As Integer
    End Function
    '***********************************************************************************************************************************************
    '*********************************************************** OPERATIONS SUR BITS ***************************************************************
    '***********************************************************************************************************************************************
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_BitInput(NModule As Integer, Entree As Integer, ByRef Data As Byte) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_BitOutput(NModule As Integer, Sortie As Integer, Etat As Integer) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_BitReadBack(NModule As Integer, Sortie As Integer, ByRef Data As Byte) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_Counter(NModule As Integer, Entree As Integer, ByRef Data As Byte) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_Config(NModule As Integer, Data As Byte) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_Pos(NModule As Integer, ByRef Data As Int32) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_ResetPos(NModule As Integer) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_WdgRun(NModule As Integer) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_WdgStop(NModule As Integer) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_WdgRearm(NModule As Integer) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_ResetPort(NModule As Integer) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_CyclePort(NModule As Integer) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_Version(Num_module As Integer, ByRef byte1 As Byte, ByRef byte2 As Byte) As Integer
    End Function
    '***********************************************************************************************************************************************
    '********************************************************** OPERATIONS ANALOGIQUE **************************************************************
    '***********************************************************************************************************************************************
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_AnaIn(NModule As Integer, Voie As Byte, ByRef Data As Short) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_AnaInVolts(NModule As Integer, Voie As Byte, ByRef Data As Double) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_AnaInmA(NModule As Integer, Voie As Byte, ByRef Data As Double) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_AnaOut(NModule As Integer, Voie As Byte, Data As Short) As Integer
    End Function
    <DllImport("TCUSB18A.dll", SetLastError:=True, CharSet:=CharSet.Ansi, CallingConvention:=CallingConvention.StdCall)> _
    Public Function TCUSB18A_AnaOutVolts(NModule As Integer, Voie As Byte, Data As Double) As Integer
    End Function
End Module
