Attribute VB_Name = "TMI_API"
'TEXIO USB488 Access API Define

Declare Function TMI_HandleOpen Lib "TMI_API" (ByVal Str_Renamed As String, ByVal Ptr As String) As Integer
'Declare Function TMI_HandleOpenU Lib "TMI_API" (ByVal Str_Renamed As String, ByVal Ptr As String) As Integer
Declare Function TMI_HandleClose Lib "TMI_API" (ByVal hID As Integer) As Integer
Declare Function TMI_Refresh Lib "TMI_API" (ByVal hID As Integer) As Integer
Declare Function TMI_Voltage Lib "TMI_API" (ByVal hID As Integer, ByVal ch As Byte, ByVal preset As Byte, ByVal Data As Double) As Integer
Declare Function TMI_VoltageQ Lib "TMI_API" (ByVal hID As Integer, ByVal ch As Byte, ByVal preset As Byte, ByRef Voltage As Double) As Integer
Declare Function TMI_Current Lib "TMI_API" (ByVal hID As Integer, ByVal ch As Byte, ByVal preset As Byte, ByVal Data As Double) As Integer
Declare Function TMI_CurrentQ Lib "TMI_API" (ByVal hID As Integer, ByVal ch As Byte, ByVal preset As Byte, ByRef Current As Double) As Integer
Declare Function TMI_MainOutput Lib "TMI_API" (ByVal hID As Integer, ByVal onoff As Byte) As Integer
Declare Function TMI_MainOutputQ Lib "TMI_API" (ByVal hID As Integer, ByRef Ans As Byte) As Integer
Declare Function TMI_Delay Lib "TMI_API" (ByVal hID As Integer, ByVal onoff As Byte) As Integer
Declare Function TMI_DelayQ Lib "TMI_API" (ByVal hID As Integer, ByRef Ans As Byte) As Integer
Declare Function TMI_OutputSel Lib "TMI_API" (ByVal hID As Integer, ByVal ch As Byte, ByVal onoff As Byte) As Integer
Declare Function TMI_OutputSelQ Lib "TMI_API" (ByVal hID As Integer, ByVal ch As Byte, ByRef Ans As Byte) As Integer
Declare Function TMI_TrackingOnOff Lib "TMI_API" (ByVal hID As Integer, ByVal onoff As Byte) As Integer
Declare Function TMI_TrackingOnOffQ Lib "TMI_API" (ByVal hID As Integer, ByRef Ans As Byte) As Integer
Declare Function TMI_TrackingMode Lib "TMI_API" (ByVal hID As Integer, ByVal mode As Byte) As Integer
Declare Function TMI_TrackingModeQ Lib "TMI_API" (ByVal hID As Integer, ByRef Ans As Byte) As Integer
Declare Function TMI_TrackingGroup Lib "TMI_API" (ByVal hID As Integer, ByVal ch As Byte, ByVal Tracking_Set As Byte) As Integer
Declare Function TMI_TrackingGroupQ Lib "TMI_API" (ByVal hID As Integer, ByVal ch As Byte, ByRef Ans As Byte) As Integer
Declare Function TMI_TrackingData Lib "TMI_API" (ByVal hID As Integer, ByVal ch As Byte, ByVal va As Byte, ByVal Data As Double) As Integer
Declare Function TMI_TrackingDataQ Lib "TMI_API" (ByVal hID As Integer, ByVal ch As Byte, ByVal va As Byte, ByRef Data As Double) As Integer
Declare Function TMI_DelayTime Lib "TMI_API" (ByVal hID As Integer, ByVal ch As Byte, ByVal Data As Double) As Integer
Declare Function TMI_DelayTimeQ Lib "TMI_API" (ByVal hID As Integer, ByVal ch As Byte, ByRef Data As Double) As Integer
Declare Function TMI_Display Lib "TMI_API" (ByVal hID As Integer, ByVal ch As Byte) As Integer
Declare Function TMI_DisplayQ Lib "TMI_API" (ByVal hID As Integer, ByRef Ans As Byte) As Integer
Declare Function TMI_Preset Lib "TMI_API" (ByVal hID As Integer, ByVal preset As Byte) As Integer
Declare Function TMI_PresetQ Lib "TMI_API" (ByVal hID As Integer, ByRef Ans As Byte) As Integer
Declare Function TMI_MoniDataQ Lib "TMI_API" (ByVal hID As Integer, ByVal ch As Byte, ByRef Voltage As Double, ByRef Current As Double, ByRef cv_cc As Byte) As Integer
Declare Function TMI_AdrQ Lib "TMI_API" (ByVal hID As Integer, ByRef Adr As Byte) As Integer
Declare Function TMI_RemoteLocal Lib "TMI_API" (ByVal hID As Integer) As Integer
Declare Function TMI_LocalLockOut Lib "TMI_API" (ByVal hID As Integer) As Integer
Declare Function TMI_DataBackUp Lib "TMI_API" (ByVal hID As Integer) As Integer
Declare Function TMI_SRQEnable Lib "TMI_API" (ByVal hID As Integer, ByVal ch As Byte) As Integer
Declare Function TMI_ModelNameQ Lib "TMI_API" (ByVal hID As Integer, ByVal Model As String) As Integer
Declare Function TMI_TimeOut Lib "TMI_API" (ByVal hID As Integer, ByVal Time As Integer) As Integer
Declare Function TMI_AllPresetQ Lib "TMI_API" (ByVal hID As Integer, ByRef PresetMem As Double) As Integer
Declare Function TMI_AllPresetQS Lib "TMI_API" (ByVal hID As Integer, ByVal PresetMem As String) As Integer
Declare Function TMI_GetSTB Lib "TMI_API" (ByVal hID As Integer, ByRef STB As Byte, ByVal Query As String, ByVal Time_Stamp As String, ByRef PcAdr As Integer, ByRef SubAdr As Integer) As Integer
Declare Function TMI_Out Lib "TMI_API" (ByVal hID As Integer, ByVal Str_Renamed As String) As Integer
Declare Function TMI_In Lib "TMI_API" (ByVal hID As Integer, ByVal strbuf As String) As Integer

Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Integer)

Public Const IF_USB As Integer = 1
Public Const IF_GPIB0 As Integer = 2
Public Const IF_COM1 As Integer = 3


